一、cmatrix命令介绍

  cmatrix是一款linux环境的炫酷屏保软件,效果为类似黑客帝国里面的代码雨。
在这里插入图片描述

二、cmatrix安装

1、centos环境下安装

1)、下载软件包

[root@test1 opt]# wget -q https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gz
[root@test1 opt]# ll
total 518608
-rw-r–r--. 1 root root 74376 Apr 1 2002 cmatrix-1.2a.tar.gz

2)、安装ncurses支持包

[root@test1 opt]# yum install -y ncurses*

3)、解压缩源码包

[root@test1 opt]# tar -zxvf cmatrix-1.2a.tar.gz
cmatrix-1.2a/
cmatrix-1.2a/NEWS

4)、释放编译文件

[root@test1 opt]# cd cmatrix-1.2a/
[root@test1 cmatrix-1.2a]# ./configure --prefix=/opt/cmatrix/
creating cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c

5)、编译安装

[root@test1 cmatrix-1.2a]# make && make install
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -Wno-comment -c cmatrix.c

make[1]: Leaving directory `/opt/cmatrix-1.2a’

6)、查看命令版本

[root@test1 opt]# cd cmatrix
[root@test1 cmatrix]# ./bin/cmatrix -V
CMatrix version 1.2a by Chris Allegretta (compiled 14:56:10, Feb 18 2021)
Email: cmatrix@asty.org Web: http://www.asty.org/cmatrix

7)、执行命令

在这里插入图片描述

2、Ubuntu环境下安装

1)、使用sudo apt-get install cmatrix安装

wuhs@ubuntuvm:~$ sudo apt-get install cmatrix
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
cmatrix-xfont
The following NEW packages will be installed:
cmatrix
0 upgraded, 1 newly installed, 0 to remove and 247 not upgraded.
Need to get 17.2 kB of archives.
After this operation, 52.2 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu focal/universe amd64 cmatrix amd64 2.0-2 [17.2 kB]
Fetched 17.2 kB in 0s (102 kB/s)
Selecting previously unselected package cmatrix.
(Reading database … 266714 files and directories currently installed.)
Preparing to unpack …/cmatrix_2.0-2_amd64.deb …
Unpacking cmatrix (2.0-2) …
Setting up cmatrix (2.0-2) …
Processing triggers for desktop-file-utils (0.24-1ubuntu3) …
Processing triggers for mime-support (3.64ubuntu1) …
Processing triggers for gnome-menus (3.36.0-1ubuntu1) …
Processing triggers for man-db (2.9.1-1) …

2)、查看cmatrix命令版本

wuhs@ubuntuvm:~$ cmatrix -V
CMatrix version 2.0 (compiled 19:01:07, Jul 9 2019)
Email: abishekvashok@gmail.com
Web: https://github.com/abishekvashok/cmatrix

3)、执行命令

在这里插入图片描述

三、cmatrix命令参数说明

1、参数说明

  • -a: 异步滚动
  • -b: 粗体字打开
  • -B: 所有粗体字符(覆盖-B)
  • -c: 使用原始矩阵中的日语字符。需要适当的字体
  • -f: 强制启用linux$TERM类型
  • -l: Linux模式(使用矩阵控制台字体)
  • -L: 锁定模式(可从另一终端关闭)
  • -o: 使用旧式滚动
  • -h: 打印使用和退出
  • -n: 无粗体字符(覆盖-b和-B,默认值)
  • -s: “屏幕保护程序”模式,在第一次按键时退出
  • -x: x窗口模式,如果您的xterm正在使用mtx.pcf公司
  • -V: 打印版本信息并退出
  • -u delay(0-10,默认值4):屏幕更新延迟
  • -C [color]:将此颜色用于矩阵(默认为绿色)
  • -r: 彩虹模式
  • -m: lambda模式

2、运行时按键调整

按键作用
1-9屏幕更新延迟时间,单位秒
a异步滚动
b粗体字打开
B所有字体粗体
n关闭粗体
!字体颜色切换为红色
@字体颜色切换为绿色
#字体颜色切换为黄色
$字体颜色切换为蓝色
%字体颜色切换为洋红色
^字体颜色切换为青色
&字体颜色切换为白色
q退出屏保
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐