几个linux终端的有趣玩法
1、sl
![](https://pic3.zhimg.com/e5d40a061a3edf355aa5118c62eba0ba_b.jpg)
还可以给别人搞恶作剧:
alias ls=sl
2. fortune
这个命令会随机输出有趣的话,比如名言或笑话.同样需要先安装.
apt-get install fortune (for aptitude based system) yum install fortune (for yum based system)
jh@linux:~$ fortune There is no distinctly native American criminal class except Congress. -- Mark Twain
还有 fortune-zh , 输出的是中文内容,可能是一些诗词,也可能是一些有趣的句子.
3. Cowsay
这是一只可以说话的 ASCII Cow.
![](https://pic3.zhimg.com/d6582f292ea280b43df275a1feeea58a_b.jpg)
还可以把 cowsay 和 fortune 结合到一起使用:
![](https://pic3.zhimg.com/439755f0dd86b22cd9f5335479881376_b.jpg)
jh@linux:~$ fortune -s | cowsay -f duck ___________________________________ / 《闺怨》 作者:王昌龄 \ \ 闺中少妇不知愁,春日凝妆上翠楼。 忽见陌头杨柳色,悔教夫婿觅封侯。 / ----------------------------------- \ \ \ >()_ (__)__ _
这只cow不仅会说话,还会思考,不信你看:
jh@linux:~$ cowthink I am thinking! ________________ ( I am thinking! ) ---------------- o ^__^ o (oo)\_______ (__)\ )\/\ ||----w | || ||
还可通过cowsay -l 查看其它动物的名字,然后-f跟上动物名,如
jh@linux:~$ cowsay -f ghostbusters Who you Gonna Call ____________________ < Who you Gonna Call > -------------------- \ \ \ __---__ _- /--______ __--( / \ )XXXXXXXXXXX\v. .-XXX( O O )XXXXXXXXXXXXXXX- /XXX( U ) XXXXXXX\ /XXXXX( )--_ XXXXXXXXXXX\ /XXXXX/ ( O ) XXXXXX \XXXXX\ XXXXX/ / XXXXXX \__ \XXXXX XXXXXX__/ XXXXXX \__----> ---___ XXX__/ XXXXXX \__ / \- --__/ ___/\ XXXXXX / ___--/= \-\ ___/ XXXXXX '--- XXXXXX \-\/XXX\ XXXXXX /XXXXX \XXXXXXXXX \ /XXXXX/ \XXXXXX > _/XXXXX/ \XXXXX--__/ __-- XXXX/ -XXXXXXXX--------------- XXXXXX- \XXXXXXXXXXXXXXXXXXXXXXXXXX/ ""VXXXXXXXXXXXXXXXXXXV""
还可以这样玩,每次图形和文字都不一样:
jh@linux:~$ cowsay -f "$(ls /usr/share/cowsay/cows | sort -R | head -1)" "$(fortune -s)" _______________________________________ / Q: What's the difference betweeen USL \ | and the Graf Zeppelin? A: The Graf | | Zeppelin represented cutting edge | \ technology for its time. / --------------------------------------- \ / \ //\ \ |\___/| / \// \\ /0 0 \__ / // | \ \ / / \/_/ // | \ \ @_^_@'/ \/_ // | \ \ //_^_/ \/_ // | \ \ ( //) | \/// | \ \ ( / /) _|_ / ) // | \ _\ ( // /) '/,_ _ _/ ( ; -. | _ _\.-~ .-~~~^-. (( / / )) ,-{ _ `-.|.-~-. .~ `. (( // / )) '/\ / ~-. _ .-~ .-~^-. \ (( /// )) `. { } / \ \ (( / )) .----~-.\ \-' .~ \ `. \^-. ///.----..> \ _ -~ `. ^-` ^-_ ///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~ /.-~ jh@linux:~$ cowsay -f "$(ls /usr/share/cowsay/cows | sort -R | head -1)" "$(fortune -s)" _____________________________________ / You will be awarded the Nobel Peace \ \ Prize... posthumously. / ------------------------------------- \ \ \ \_ \ \\ \ \\/\ \ _\\/ \ / -\ \ / oo -\ \ / \ | ---\ -\ \--/ \ \ | -\ \ -\ -------------\ /-\ \ \-------/ ---/ \ \ |\ \ | / | | \ | \ | | / \ | | / \ | \ \ \| - /--------\ | o \+ +--------- \ | | | | \ | | \ | | | | \ | | \ | \ | | | | | \ \ | | | | +--+ ---+
4. xcowsay
如果你觉得 ASCII Cow 太单调了,这里还有一头图形化的Cow.
![](https://pic2.zhimg.com/1da42bd63659d1259502bdddf9a2f9a5_b.jpg)
5.cmatrix
这是屏保,没错,就是屏保!从上往下输出无尽的字符串,类似<<黑客帝国>>中的矩阵效果.
![](https://pic2.zhimg.com/67ddd9c57673d6cdc1a47e1cefc91011_b.jpg)
5.yes
yes命令会一直重复输出字符串,用Ctrl+c终止.
jh@linux:~$ yes hello,world hello,world hello,world hello,world hello,world hello,world hello,world hello,world
6.toilet
输出由ASCII码组成的艺术字.
![](https://pic1.zhimg.com/7f92476718289196bf56e4b517091d2c_b.jpg)
如果觉得白色不好看,还可以通过参数设置字体和颜色.
![](https://pic1.zhimg.com/9a228f2b9bc7c254a2576aa78a7702b4_b.jpg)
7. figlet
另一款在终端将字符进行图形化输出的软件.
jh@linux:~$ figlet linux _ _ | (_)_ __ _ ___ __ | | | '_ \| | | \ \/ / | | | | | | |_| |> < |_|_|_| |_|\__,_/_/\_\ jh@linux:~$ figlet linux -f script _ | | o | | _ _ |/ | / |/ | | | /\/ |__/|_/ | |_/ \_/|_/ /\_/ jh@linux:~$ figlet linux -f bubble _ _ _ _ _ / \ / \ / \ / \ / \ ( l | i | n | u | x ) \_/ \_/ \_/ \_/ \_/ jh@linux:~$ figlet linux -f shadow |_) | | __ \ | |\ \ / | | | | | | ` < _|_|_| _|\__,_| _/\_\ jh@linux:~$ figlet linux -f lean _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/
8. oneko
输入命令后会屏幕上会出现一直喵星人,鼠标移到哪它就跟到哪,鼠标不动的时候它就睡觉哈哈.
![](https://pic2.zhimg.com/9d856aaa52238c805fcc488179acc37d_b.jpg)
9. xeyes
输入它,屏幕上会出现一双眼睛,一直盯着你看,你的鼠标移到哪,它就盯到哪.
![](https://pic2.zhimg.com/20142c1bca2bd87821b731cdebc79251_b.jpg)