首先看一下效果,该命令通常用于制作程序启动时的提示
[root@hadoop01 ~]# figlet hadoop
_ _
| |__ __ _ __| | ___ ___ _ __
| '_ \ / _` |/ _` |/ _ \ / _ \| '_ \
| | | | (_| | (_| | (_) | (_) | |_) |
|_| |_|\__,_|\__,_|\___/ \___/| .__/
|_|
对于红帽及其衍生发行版,例如centos,官方的rpm repository提供的rpm包为求稳定,通常较为滞后。而epel(extra packages for enterprise Linux)源是为其提供高质量软件包的项目。装上了 EPEL之后,就相当于添加了一个第三方源。
如果你知道rpmfusion.org的话,拿 rpmfusion 做比较还是很恰当的,rpmfusion 主要为桌面发行版提供大量rpm包,而EPEL则为服务器版本提供大量的rpm包,而且大多数rpm包在官方 repository 中是找不到的。
另外一个特点是绝大多数rpm包要比官方repository 的rpm包版本要来得新,
安装步骤
#centos下使用yum命令进行安装,由于yum的base-repo源中没有figlet,因此先安装EPEL源
yum install epel-releaseyum repolist all
#使用yum命令进行安装figlet
yum -y install figlet
#安装完成之后,就可以运行该命令
figlet hello
#--->执行结果
[root@hadoop01 ~]# figlet hello
_ _ _
| |__ ___| | | ___
| '_ \ / _ \ | |/ _ \
| | | | __/ | | (_) |
|_| |_|\___|_|_|\___/
#使用管道将信息传递给figlet命令
[root@hadoop01 ~]# echo "hello world" | figlet
_ _ _ _ _
| |__ ___| | | ___ __ _____ _ __| | __| |
| '_ \ / _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
| | | | __/ | | (_) | \ V V / (_) | | | | (_| |
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|
黑客帝国效果
关于cmatrix的在线安装,试了很多个网上的例子,没有下载下来,只能手动下载并安装了
下载的是 cmatrix-1.2a.tar.gz
#上传到linux系统中
#解压
tar-zxvf cmatrix-1.2a.tar.gz
#进入cmatrix-1.2a
cd cmatrix-1.2a
yum install ncurses-devel
./configure && make && make install
#如果在使用上面这个命令的时候出现 checking for gcc... no这个报错,那么请安装gcc,下一步出现问题才执行
yum -y install gcc
#执行命令即可看到黑客帝国效果
cmatrix [-abBflohnsVx] [-C color]
#命令细节使用帮助命令查看
man cmatrix
OPTIONS
-a Asynchronous scroll
-b Bold characters on
-B All bold characters (overrides -b)
-f Force the linux $TERM type to be on
-l Linux mode (sets "matrix.fnt" font in console)
-o Use old-style scrolling
-h, -? Print usage and exit
-n No bold characters (overrides -b and -B)
-s "Screensaver" mode, exits on first keystroke
-x X window mode, use if your xterm is using mtx.pcf
-V Print version information and exit
-u delay
Screen update delay 0 - 9, default 4
-C color
Use this color for matrix (default green). Valid colors are green, red, blue, white, yellow, cyan, magenta and black.