黑客帝国大部分人都知道吧,屏幕前的绿条条看着挺炫酷的,平常接触Linux系统的,也得娱乐一下,看看这个效果怎么实现的吧!
1,下载cmatrixcmatrix-1.2a.tar.gz
链接:工具包下载
提取码:myqx
2,安装依赖
yum install -y gcc ncurses-devel
3,上传包并解压
tar -xvf cmatrix-1.2a.tar.gz
4,进入解压后的目录,配置安装路径
./configure --prefix=/usr/local/cmatrix
5,编译
make && make install
6,配置环境变量
echo "export PATH=\$PATH:/usr/local/cmatrix/bin" > /etc/profile.d/cmatrix.sh && . /etc/profile.d/cmatrix.sh
7,运行查看效果
cmatrix
8,其他效果cmatrix -b 参数
-a :异步滚动(默认)
-b :随机粗体
-B :全部粗体
-f :force the linux $TERM type to be on
-l :Linux mode (sets "matrix.fnt" font in console)
-o :使用旧风格滚动(不好看)
-h :获得帮助信息
-n :不使用粗体(默认)
-s :"Screensaver" mode,exits on first keystroke
-x :X window 模式,好像就是显示的符号不一样
-V :显示版本信息
-u :刷新频率,0-9,也就是滚动的快慢
-C :显示的颜色,支持green(默认),red,blue,white,yellow,cyan,
9,执行效果演示
cmatrix -b -C red // 改变颜色,c要注意大写