Linux命令及Linux终端的20个趣事
2017-07-04 00:00
435 查看
摘要:玩Linux其乐无穷!哈哈。不相信。记住我的话,在文章结尾时你就会相信Linux确实好玩了。20LinuxFunnyCommands1.命令:sl(蒸汽机车)你可能了解‘ls’命令,并经常使用它来查看文件夹的内容。
玩Linux其乐无穷!哈哈。不相信。记住我的话,在文章结尾时你就会相信Linux确实好玩了。
20LinuxFunnyCommands
root@tecmint:~#apt-getinstallsl(InDebianlikeOS)
root@tecmint:~#yum-yinstallsl(InRedHatlikeOS)
root@tecmint:~#sl
slcommand
当你敲入的是‘LS‘而不是’ls‘时,这个命令也会运行。
root@tecmint:~#telnettowel.blinkenlights.nl
telnetcommand
root@tecmint:~#apt-getinstallfortune(foraptitudebasedsystem)
root@tecmint:~#yuminstallfortune(foryumbasedsystem)
root@tecmint:~#fortune
You'renotmytype.Forthatmatter,you'renotevenmyspecies!!!
Futurelooksspotty.Youwillspillsoupinlateevening.
Youworrytoomuchaboutyourjob.Stopit.Youarenotpaidenoughtoworry.
Yourlovelifewillbe...interesting.
root@tecmint:~#rev
123abc
cba321
xuniLebotnrob
borntobeLinux
root@tecmint:~#factor
5
5:5
12
12:223
1001
1001:71113
5442134
5442134:22721067
root@tecmint:~#foriin{1..12};doforjin$(seq1$i);doecho-ne$ix$j=$((i*j))\\t;done;echo;done
1x1=1
2x1=22x2=4
3x1=33x2=63x3=9
4x1=44x2=84x3=124x4=16
5x1=55x2=105x3=155x4=205x5=25
6x1=66x2=126x3=186x4=246x5=306x6=36
7x1=77x2=147x3=217x4=287x5=357x6=427x7=49
8x1=88x2=168x3=248x4=328x5=408x6=488x7=568x8=64
9x1=99x2=189x3=279x4=369x5=459x6=549x7=639x8=729x9=81
10x1=1010x2=2010x3=3010x4=4010x5=5010x6=6010x7=7010x8=8010x9=9010x10=100
11x1=1111x2=2211x3=3311x4=4411x5=5511x6=6611x7=7711x8=8811x9=9911x10=11011x11=121
12x1=1212x2=2412x3=3612x4=4812x5=6012x6=7212x7=8412x8=9612x9=10812x10=12012x11=13212x12=144
root@tecmint:~#apt-getinstallcowsay(forDebianbasedOS)
root@tecmint:~#yuminstallcowsay(forRedHatbasedOS)
root@tecmint:~#cowsayILovenix
____________
<ILovenix>
------------
\^__^
\(oo)\_______
(__)\)\/\
||----w|
||||
如果用管道将‘fortunecommand’命令重定向到cowsay会怎样呢?
root@tecmint:~#fortune|cowsay
_________________________________________
/Q:HowmanyOregoniansdoesittaketo\
|screwinalightbulb?A:Three.Oneto|
|screwinthelightbulbandtwotofend|
|offallthose|
||
|Californianstryingtosharethe|
\experience./
-----------------------------------------
\^__^
\(oo)\_______
(__)\)\/\
||----w|
||||
提示:‘|’是管道命令符。通常它是将一个命令的输出作为下一个命令的输入。在上面的例子中‘fortune’的输出作为‘cowsay’命令的输出。管道命令会经常用在脚本和程序编写中。
xcowsay是一个图形界面程序。它与cowsay类似只是以一种图形的方式来表达,可以说是X版本的cowsay。
apt-getinsatllxcowsay
yuminstallxcowsay
root@tecmint:~#xcowsayILovenix
xcowsaycommand
cowthink是另一个命令。运行“cowthinkLinuxissooofunny”看看它与cowsay的不同吧。
apt-getinsatllcowthink
yuminstallcowthink
root@tecmint:~#cowthink....Linuxissooofunny
_________________________
(....Linuxissooofunny)
-------------------------
o^__^
o(oo)\_______
(__)\)\/\
||----w|
||||
root@tecmint:~#yesILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
提示:(直到你按下ctrl+c才停止)
root@tecmint:~#apt-getinstalltoilet
root@tecmint:~#yuminstalltoilet
root@tecmint:~#toilettecmint
mmmmmmm"m
#mmmmmmmmmmmmmmmmmmm#mmmmmmmmmmmmm
##"##""#####"###""#""####
##""""##############
#"#mm""#mm"###mm#mm##"mm#"#mm""#m#"###
这个命令甚至提供了一些颜色和字体格式。
root@tecmint:~#toilet-fmono12-FmetalTecmint.com
toiletcommand
提示:Figlet是另外一个与toilet产生的效果类似的命令。
root@tecmint:~#apt-getinstallcmatrix
root@tecmint:~#yuminstallcmatrix
root@tecmint:~#cmatrix
cmatrixcommand
root@tecmint:~#apt-getinstalloneko
root@tecmint:~#yuminstalloneko
root@tecmint:~#oneko
onekocommand
提示:关闭运行着oneko的终端时,Jerry也会随之消失,重新启动终端时也不会再出项。你可以将这个程序添加到启动选项中然后继续使用它。
root@tecmint:~#:(){:|:&}:
root@tecmint:~#whiletrue;doecho"$(date'+%D%T'|toilet-fterm-Fborder--gay)";sleep1;done
Linuxwhilecommand
提示:以上脚本通过下面的修改也会产生类似的输出但是还是有点不同的,在你的终端试试吧。
root@tecmint:~#whiletrue;doclear;echo"$(date'+%D%T'|toilet-fterm-Fborder--gay)";sleep1;done
root@tecmint:~#apt-getinstallespeak
root@tecmint:~#yuminstallespeak
root@tecmint:~#espeak"TecmintisaverygoodwebsitededicatedtoFossCommunity"
root@tecmint:~#apt-getinstalllibaa-bin
root@tecmint:~#aafire
root@tecmint:~#bb
bbcommand
root@tecmint:~#url-uYourUsername:YourPassword-dstatus="Yourstatusmessage"http://twitter.com/statuses/update.xml
root@tecmint:~#apt-getinstalllibcurses-perl
root@tecmint:~#cd/tmp
root@tecmint:~#wgethttp://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
root@tecmint:~#tar-zxvfTerm-Animation-2.4.tar.gz
root@tecmint:~#cdTerm-Animation-2.4/
root@tecmint:~#perlMakefile.PL&&make&&maketest
root@tecmint:~#makeinstall
root@tecmint:~#cd/tmp
root@tecmint:~#wgethttp://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
root@tecmint:~#tar-zxvfasciiquarium.tar.gz
root@tecmint:~#cdasciiquarium_1.1/
root@tecmint:~#cpasciiquarium/usr/local/bin
root@tecmint:~#chmod0755/usr/local/bin/asciiquarium
最后在终端运行“asciiquarium”或者“/usr/local/bin/asciiquarium”,记得不要加引号,神奇的一幕将在你眼前展现。
root@tecmint:~#asciiquarium
aquariumcommand
baby
celibacy
condom
date
echo
flame
flog
gong
grope,egrope,fgrope
party
rescrog
rm
rtfm
tm
uubp
woman(undocumented)
xkill
xlart
sex
strfry
root@tecmint:~#manbaby
root@tecmint:~#world
bash:world:notfound
root@tecmint:~#touchgirls\boo**
touch:cannottouch`girlsboo**`:Permissiondenied
root@tecmint:~#nicemanwoman
Nomanualentryforwoman
root@tecmint:~#^Howdidthesexchangeoperationgo?^
bash::s^Howdidthesexchangeoperationgo?^:substitutionfailed
root@tecmint:~#%blow
bash:fg:%blow:nosuchjob
root@tecmint:~#makelove
make:***Noruletomaketarget`love`.Stop.
$[whereismybrain?
sh:2:[:missing]
%man:whydidyougetadivorce?
man::Toomanyarguments.
%!:say,whatissaccharine?
Badsubstitute.
server@localhost:/srv$\(-
bash:(-:commandnotfound
Linux总是sexy:who|grep-iblonde|date;cd~;unzip;touch;strip;finger;mount;gasp;yes;uptime;umount;sleep(如果你知道我的意思,汗!)
还有一些其它的命令,只是这些命令并不能在所有的系统上运行,所以本文没有涉及到。比如说dog,filter,banner
原文发布时间为:2014-04-10
本文来自云栖社区合作伙伴“Linux中国”
用云栖社区APP,舒服~
原文链接
玩Linux其乐无穷!哈哈。不相信。记住我的话,在文章结尾时你就会相信Linux确实好玩了。
20LinuxFunnyCommands
1.命令:sl(蒸汽机车)
你可能了解‘ls’命令,并经常使用它来查看文件夹的内容。但是,有些时候你可能会拼写成‘sl’,这时我们应该如何获得一些乐趣而不是看见“commandnotfound”呢?安装sl
root@tecmint:~#apt-getinstallsl(InDebianlikeOS)
root@tecmint:~#yum-yinstallsl(InRedHatlikeOS)
输出
root@tecmint:~#sl
slcommand
当你敲入的是‘LS‘而不是’ls‘时,这个命令也会运行。
2.命令:telnet
非也!非也!!这可不像它平常那样复杂。你可能很熟悉telnet。Telnet是一个文本化的双向网络协议。这里不需要安装什么东西。你需要的就是一个Linux系统和一个连通的网络。root@tecmint:~#telnettowel.blinkenlights.nl
telnetcommand
3.命令:fortune
试试你未知的运气,终端里有时也有好玩的。安装fortune
root@tecmint:~#apt-getinstallfortune(foraptitudebasedsystem)
root@tecmint:~#yuminstallfortune(foryumbasedsystem)
root@tecmint:~#fortune
You'renotmytype.Forthatmatter,you'renotevenmyspecies!!!
Futurelooksspotty.Youwillspillsoupinlateevening.
Youworrytoomuchaboutyourjob.Stopit.Youarenotpaidenoughtoworry.
Yourlovelifewillbe...interesting.
4.命令:rev(翻转)
它会把传递给它的的每个字符串都反过来,是不是很好玩。root@tecmint:~#rev
123abc
cba321
xuniLebotnrob
borntobeLinux
5.命令:factor
该谈点儿关于Mathematics的了,这个命令输出给定数字的所有因子。root@tecmint:~#factor
5
5:5
12
12:223
1001
1001:71113
5442134
5442134:22721067
6.命令:script
好的,这不是什么命令,而是一个脚本,一个很有趣的脚本。root@tecmint:~#foriin{1..12};doforjin$(seq1$i);doecho-ne$ix$j=$((i*j))\\t;done;echo;done
1x1=1
2x1=22x2=4
3x1=33x2=63x3=9
4x1=44x2=84x3=124x4=16
5x1=55x2=105x3=155x4=205x5=25
6x1=66x2=126x3=186x4=246x5=306x6=36
7x1=77x2=147x3=217x4=287x5=357x6=427x7=49
8x1=88x2=168x3=248x4=328x5=408x6=488x7=568x8=64
9x1=99x2=189x3=279x4=369x5=459x6=549x7=639x8=729x9=81
10x1=1010x2=2010x3=3010x4=4010x5=5010x6=6010x7=7010x8=8010x9=9010x10=100
11x1=1111x2=2211x3=3311x4=4411x5=5511x6=6611x7=7711x8=8811x9=9911x10=11011x11=121
12x1=1212x2=2412x3=3612x4=4812x5=6012x6=7212x7=8412x8=9612x9=10812x10=12012x11=13212x12=144
7.命令:Cowsay
一个在终端用ASCII码组成的小牛,这个小牛会说出你想要它说的话。安装Cowsay
root@tecmint:~#apt-getinstallcowsay(forDebianbasedOS)
root@tecmint:~#yuminstallcowsay(forRedHatbasedOS)
输出
root@tecmint:~#cowsayILovenix
____________
<ILovenix>
------------
\^__^
\(oo)\_______
(__)\)\/\
||----w|
||||
如果用管道将‘fortunecommand’命令重定向到cowsay会怎样呢?
root@tecmint:~#fortune|cowsay
_________________________________________
/Q:HowmanyOregoniansdoesittaketo\
|screwinalightbulb?A:Three.Oneto|
|screwinthelightbulbandtwotofend|
|offallthose|
||
|Californianstryingtosharethe|
\experience./
-----------------------------------------
\^__^
\(oo)\_______
(__)\)\/\
||----w|
||||
提示:‘|’是管道命令符。通常它是将一个命令的输出作为下一个命令的输入。在上面的例子中‘fortune’的输出作为‘cowsay’命令的输出。管道命令会经常用在脚本和程序编写中。
xcowsay是一个图形界面程序。它与cowsay类似只是以一种图形的方式来表达,可以说是X版本的cowsay。
apt-getinsatllxcowsay
yuminstallxcowsay
输出
root@tecmint:~#xcowsayILovenix
xcowsaycommand
cowthink是另一个命令。运行“cowthinkLinuxissooofunny”看看它与cowsay的不同吧。
apt-getinsatllcowthink
yuminstallcowthink
输出
root@tecmint:~#cowthink....Linuxissooofunny
_________________________
(....Linuxissooofunny)
-------------------------
o^__^
o(oo)\_______
(__)\)\/\
||----w|
||||
8.命令:yes
yes是一个非常有趣又有用的命令,尤其对于脚本编写和系统管理员来说,它可以自动地生成预先定义的响应或者将其传到终端。root@tecmint:~#yesILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
ILoveLinux
提示:(直到你按下ctrl+c才停止)
9.命令:toilet
什么?你在开玩笑吗!当然没有,但肯定的是这个命令的名字太搞了,我也不知道这个命令的名字从何而来。安装toilet
root@tecmint:~#apt-getinstalltoilet
root@tecmint:~#yuminstalltoilet
输出
root@tecmint:~#toilettecmint
mmmmmmm"m
#mmmmmmmmmmmmmmmmmmm#mmmmmmmmmmmmm
##"##""#####"###""#""####
##""""##############
#"#mm""#mm"###mm#mm##"mm#"#mm""#m#"###
这个命令甚至提供了一些颜色和字体格式。
root@tecmint:~#toilet-fmono12-FmetalTecmint.com
toiletcommand
提示:Figlet是另外一个与toilet产生的效果类似的命令。
10.命令:cmatrix
你可能看多好莱坞的电影‘黑客帝国’并陶醉于被赋予Neo的能看到在矩阵中任何事物的能力,或者你会想到一幅类似于‘Hacker’的桌面的生动画面。安装cmatrix
root@tecmint:~#apt-getinstallcmatrix
root@tecmint:~#yuminstallcmatrix
输出
root@tecmint:~#cmatrix
cmatrixcommand
11.命令:oneko
可能你坚信Linux的鼠标指针永远是同样的黑色或白色一点儿也不生动,那你就错了。“oneko”是一个会让一个“Jerry”你的鼠标指针附着到你鼠标上的一个软件包。安装oneko
root@tecmint:~#apt-getinstalloneko
root@tecmint:~#yuminstalloneko
输出
root@tecmint:~#oneko
onekocommand
提示:关闭运行着oneko的终端时,Jerry也会随之消失,重新启动终端时也不会再出项。你可以将这个程序添加到启动选项中然后继续使用它。
12.Fork炸弹
这是一段非常欠抽的代码。运行这个命令的后果自己负责。这个命令其实是一个fork炸弹,它会以指数级的自乘,直到所有的系统资源都被利用了或者系统挂起(想要见识这个命令的威力你可以试一次这个命令,但是后果自负,记得在运行它之前关掉并保存其它所有程序和文件)。root@tecmint:~#:(){:|:&}:
13.命令:while
下面的”while“命令是一个脚本,这个脚本可以为你提供彩色的日期和文件直到你按下中断键(ctrl+c)。复制粘贴这个命令到你的终端。root@tecmint:~#whiletrue;doecho"$(date'+%D%T'|toilet-fterm-Fborder--gay)";sleep1;done
Linuxwhilecommand
提示:以上脚本通过下面的修改也会产生类似的输出但是还是有点不同的,在你的终端试试吧。
root@tecmint:~#whiletrue;doclear;echo"$(date'+%D%T'|toilet-fterm-Fborder--gay)";sleep1;done
14.命令:espeak
将你的多媒体音箱的音量调到最大,然后在将这个命令复制到你的终端,来看看你听到上帝的声音时的反应吧。安装espeak
root@tecmint:~#apt-getinstallespeak
root@tecmint:~#yuminstallespeak
输出
root@tecmint:~#espeak"TecmintisaverygoodwebsitededicatedtoFossCommunity"
15.命令:aafire
在你的终端放一把火如何。把这个“aafire”敲到你的终端,不需要什么引号看看这神奇的一幕吧。按下任意键中指该程序。安装aafire
root@tecmint:~#apt-getinstalllibaa-bin
输出
root@tecmint:~#aafire
16.命令:bb
首先安装“apt-getinstallbb”,然后敲入“bb”看看会发生什么吧。root@tecmint:~#bb
bbcommand
17.命令:url
如果在你的朋友面前用命令行来改变你的twitterstatus会不会很酷呢。用你的用户名密码和你想要的状态分别替换username,password和“yourstatusmessage“就可以了。root@tecmint:~#url-uYourUsername:YourPassword-dstatus="Yourstatusmessage"http://twitter.com/statuses/update.xml
18.ASCIIquarium
想要在终端弄一个水族馆该,怎么办?root@tecmint:~#apt-getinstalllibcurses-perl
root@tecmint:~#cd/tmp
root@tecmint:~#wget
root@tecmint:~#tar-zxvfTerm-Animation-2.4.tar.gz
root@tecmint:~#cdTerm-Animation-2.4/
root@tecmint:~#perlMakefile.PL&&make&&maketest
root@tecmint:~#makeinstall
安装ASCIIquarium
下载并安装ASCIIquarium。root@tecmint:~#cd/tmp
root@tecmint:~#wget
root@tecmint:~#tar-zxvfasciiquarium.tar.gz
root@tecmint:~#cdasciiquarium_1.1/
root@tecmint:~#cpasciiquarium/usr/local/bin
root@tecmint:~#chmod0755/usr/local/bin/asciiquarium
最后在终端运行“asciiquarium”或者“/usr/local/bin/asciiquarium”,记得不要加引号,神奇的一幕将在你眼前展现。
root@tecmint:~#asciiquarium
aquariumcommand
19.命令:funnymanpages
首先安装“apt-getinstallfunny-manpages”然后运行下面命令的man手册。其中一些baby
celibacy
condom
date
echo
flame
flog
gong
grope,egrope,fgrope
party
rescrog
rm
rtfm
tm
uubp
woman(undocumented)
xkill
xlart
sex
strfry
root@tecmint:~#manbaby
20.LinuxTweaks
该到了做一些优化的时候了root@tecmint:~#world
bash:world:notfound
root@tecmint:~#touchgirls\boo**
touch:cannottouch`girlsboo**`:Permissiondenied
root@tecmint:~#nicemanwoman
Nomanualentryforwoman
root@tecmint:~#^Howdidthesexchangeoperationgo?^
bash::s^Howdidthesexchangeoperationgo?^:substitutionfailed
root@tecmint:~#%blow
bash:fg:%blow:nosuchjob
root@tecmint:~#makelove
make:***Noruletomaketarget`love`.Stop.
$[whereismybrain?
sh:2:[:missing]
%man:whydidyougetadivorce?
man::Toomanyarguments.
%!:say,whatissaccharine?
Badsubstitute.
server@localhost:/srv$\(-
bash:(-:commandnotfound
Linux总是sexy:who|grep-iblonde|date;cd~;unzip;touch;strip;finger;mount;gasp;yes;uptime;umount;sleep(如果你知道我的意思,汗!)
还有一些其它的命令,只是这些命令并不能在所有的系统上运行,所以本文没有涉及到。比如说dog,filter,banner
原文发布时间为:2014-04-10
本文来自云栖社区合作伙伴“Linux中国”
用云栖社区APP,舒服~
相关文章推荐
- Linux 命令及Linux终端的20个趣事
- 20个Linux命令及Linux终端的趣事
- 20个Linux命令及Linux终端的趣事
- 转 Linux命令及Linux终端的20个趣事
- 20个Linux命令及Linux终端的趣事
- 20个Linux命令及Linux终端的趣事
- 20个Linux命令及Linux终端的趣事
- Linux命令及Linux终端的20个趣事
- Linux命令及Linux终端的20个趣事
- Linux命令及Linux终端的20个趣事
- linux终端下修改文件名及文件内容的命令
- Linux下不用终端命令打开.jar文件的方法
- 全面介绍Linux终端命令(一)
- 如何通过终端命令查看 linux 的系统信息
- Linux下不用终端命令打开.jar文件的方法
- 查看DOS,Linux终端命令 ,无须记忆。
- [转]Linux终端命令用法精选
- 终端中用命令成功修改linux~Ubuntu PATH环境变量
- Linux终端常用命令
- linux下几个基本的命令和命令行终端的使用技巧