在 Linux 里,cmatrix(那种“黑客帝国”字符雨效果)本身支持通过命令行参数和配置文件改颜色。下面按「最简单 → 最灵活」给你讲。
cmatrix -C red
可选颜色有:
green
red
blue
white
yellow
cyan
magenta
black
示例:
cmatrix -C cyan
cmatrix -C yellow
cmatrix -r
每次启动颜色随机。
cmatrix -C red -u 2
-u 是更新速度(1最快,10最慢)
vi ~/.cmatrixrc
color=cyan
或者:
color=green
bold=1
常用配置项:
color=green # 颜色
bold=1 # 是否加粗
screen=1 # 全屏
保存后直接运行:
cmatrix
⚠️ 原生 cmatrix 不支持 RGB 自定义
如果你想要:
那就需要用 修改版 cmatrix 或自己写:
cmatrix + lolcatcmatrix | lolcat
(只适合截图,不是真动态)
unimatrixsudo apt install unimatrix
unimatrix -c red
-C 参数?说明你装的是旧版:
cmatrix -V
建议重装:
sudo apt install cmatrix
如果你愿意,我可以:
你想走哪条路?