20个Linux命令及Linux终端的趣事
玩Linux其乐无穷!哈哈。不相信。记住我的话,在文章结尾时你就会相信Linux确实好玩了。
1. 命令:sl (蒸汽机车)
你可能了解 ‘ls’ 命令,并经常使用它来查看文件夹的内容。但是,有些时候你可能会拼写成 ‘sl’ ,这时我们应该如何获得一些乐趣而不是看见“command not found”呢?
安装 sl
1. root@tecmint:~# apt-get install sl      (In Debian like OS) 
2. root@tecmint:~# yum -y install sl       (In Red Hat like OS) 
输出
1. root@tecmint:~# sl 
当你敲入的是‘LS‘而不是’ls‘时,这个命令也会运行。
2. 命令:telnet
非也!非也!!这可不像它平常那样复杂。你可能很熟悉telnet。Telnet 是一个文本化的双向网络协议。这里不需要安装什么东西。你需要的就是一个Linux系统和一个连通的网络。
1. root@tecmint:~# telnet towel.blinkenlights.nl 
3. 命令:fortune
试试你未知的运气,终端里有时也有好玩的。
安装 fortune
1. root@tecmint:~# apt-get install fortune     (for aptitude based system) 
2. root@tecmint:~# yum install fortune         (for yum based system) 
3. root@tecmint:~# fortune 
4. You're not my type.  For that matter, you're not even my species!!! 
5. Future looks spotty.  You will spill soup in late evening. 
6. You worry too much about your job.  Stop it.  You are not paid enough to worry. 
7. Your love life will& interesting. 
4. 命令:rev(翻转)
它会把传递给它的的每个字符串都反过来,是不是很好玩。
1. root@tecmint:~# rev 
2. 123abc 
3. cba321 
4. xuniL eb ot nrob 
5. born to be Linux 
5. 命令:factor
该谈点儿关于Mathematics的了,这个命令输出给定数字的所有因子。
1. root@tecmint:~# factor 
2.
3. 5: 5 
4. 12 
5. 12: 2 2 3 
6. 1001 
7. 1001: 7 11 13 
8. 5442134 
9. 5442134: 2 2721067 
6.命令:script
好的,这不是什么命令,而是一个脚本,一个很有趣的脚本。
1. root@tecmint:~# for i in {1..12}; do for j in $(seq 1 $i); do echo -ne $i x $j=$((i*j))\\t;done; echo;done 
2. 1 x 11=1 
3. 2 x 1=2 2 x 2=4 
4. 3 x 1=3 3 x 2=6 3 x 3=9 
5. 4 x 1=4 4 x 2=linux终端下载软件8 4 x 3=12    4 x 4=16     
6. 5 x 1=5 5 x 2=10    5 x 3=15    5 x 4=20    5 x 5=25     
7. 6 x 1=6 6 x 2=12    6 x 3=18    6 x 4=24    6 x 5=30    6 x 6=36     
8. 7 x 1=7 7 x 2=14    7 x 3=21    7 x 4=28    7 x 5=35    7 x 6=42    7 x 7=49     
9. 8 x 1=8 8 x 2=16    8 x 3=24    8 x 4=32    8 x 5=40    8 x 6=48    8 x 7=56    8 x 8=64     
10. 9 x 1=9 9 x 2=18    9 x 3=27    9 x 4=36    9 x 5=45    9 x 6=54    9 x 7=63    9 x 8=72    9 x 9=81     
11. 10 x 1=10   10 x 2=20   10 x 3=30   10 x 4=40   10 x 5=50   10 x 6=60   10 x 7=70   10 x 8=80   10 x 9=90   10 x 10=100 
12. 11 x 1=11   11 x 2=22   11 x 3=33   11 x 4=44   11 x 5=55   11 x 6=66   11 x 7=77   11 x 8=88   11 x 9=99   11 x 10=110 11 x 11=121 
13. 12 x 1=12   12 x 2=24   12 x 3=36   12 x 4=48   12 x 5=60   12 x 6=72   12 x 7=84   12 x 8=96   12 x 9=108  12 x 10=120 12 x 11=132 12 x 12=144 
7.命令:Cowsay
一个在终端用ASCII码组成的小牛,这个小牛会说出你想要它说的话。
安装Cowsay
1. root@tecmint:~# apt-get install cowsay      (for Debian based OS) 
2. root@tecmint:~# yum install cowsay      (for Red Hat based OS) 
输出
1. root@tecmint:~# cowsay I Love nix