日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux命令及Linux终端的20个趣事

發布時間:2025/3/18 linux 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux命令及Linux终端的20个趣事 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 命令:sl (蒸汽機車)

你可能了解 ‘ls’ 命令,并經常使用它來查看文件夾的內容。但是,有些時候你可能會拼寫成 ‘sl’ ,這時我們應該如何獲得一些樂趣而不是看見“command not found”呢?

安裝 sl

  • root@tecmint:~#?apt-get?install sl?(InDebian?like OS)

  • root@tecmint:~#?yum?-y install sl?(InRedHat?like OS)

  • 輸出

  • root@tecmint:~#?sl

  • 當你敲入的是‘LS‘而不是’ls‘時,這個命令也會運行。

    2. 命令:telnet

    非也!非也!!這可不像它平常那樣復雜。你可能很熟悉telnet。Telnet 是一個文本化的雙向網絡協議。這里不需要安裝什么東西。你需要的就是一個Linux系統和一個連通的網絡。

  • root@tecmint:~#?telnet towel.blinkenlights.nl

  • 3. 命令:fortune

    試試你未知的運氣,終端里有時也有好玩的。

    安裝 fortune

  • root@tecmint:~#?apt-get?install fortune?(for?aptitude based system)

  • root@tecmint:~#?yum install fortune?(for?yum based system)

  • root@tecmint:~#?fortune

  • You're not my type. For that matter, you're?not?even?my?species!!!

  • Future?looks spotty.You?will spill soup?in?late evening.

  • You?worry too much about your job.Stop?it.You?are?not?paid enough to worry.

  • Your?love life will be...?interesting.

  • 4. 命令:rev(翻轉)

    它會把傳遞給它的的每個字符串都反過來,是不是很好玩。

  • root@tecmint:~#?rev

  • 123abc

  • cba321

  • xuniL eb ot nrob

  • born to be?Linux

  • 5. 命令:factor

    該談點兒關于Mathematics的了,這個命令輸出給定數字的所有因子。

  • root@tecmint:~#?factor

  • 5

  • 5:5

  • 12

  • 12:223

  • 1001

  • 1001:71113

  • 5442134

  • 5442134:22721067

  • 6.命令:script

    好的,這不是什么命令,而是一個腳本,一個很有趣的腳本。

  • root@tecmint:~#for?i?in{1..12};dofor?j?in?$(seq?1?$i);do?echo?-ne $i x $j=$((i*j))\\t;done;?echo;done

  • 1?x?1=1

  • 2?x?1=22?x?2=4

  • 3?x?1=33?x?2=63?x?3=9

  • 4?x?1=44?x?2=84?x?3=124?x?4=16

  • 5?x?1=55?x?2=105?x?3=155?x?4=205?x?5=25

  • 6?x?1=66?x?2=126?x?3=186?x?4=246?x?5=306?x?6=36

  • 7?x?1=77?x?2=147?x?3=217?x?4=287?x?5=357?x?6=427?x?7=49

  • 8?x?1=88?x?2=168?x?3=248?x?4=328?x?5=408?x?6=488?x?7=568?x?8=64

  • 9?x?1=99?x?2=189?x?3=279?x?4=369?x?5=459?x?6=549?x?7=639?x?8=729?x?9=81

  • 10?x?1=1010?x?2=2010?x?3=3010?x?4=4010?x?5=5010?x?6=6010?x?7=7010?x?8=8010?x?9=9010?x?10=100

  • 11?x?1=1111?x?2=2211?x?3=3311?x?4=4411?x?5=5511?x?6=6611?x?7=7711?x?8=8811?x?9=9911?x?10=11011?x?11=121

  • 12?x?1=1212?x?2=2412?x?3=3612?x?4=4812?x?5=6012?x?6=7212?x?7=8412?x?8=9612?x?9=10812?x?10=12012?x?11=13212?x?12=144

  • 7.命令:Cowsay

    一個在終端用ASCII碼組成的小牛,這個小牛會說出你想要它說的話。

    安裝Cowsay

  • root@tecmint:~#?apt-get?install cowsay?(forDebian?based OS)

  • root@tecmint:~#?yum install cowsay?(forRedHat?based OS)

  • 輸出

  • root@tecmint:~#?cowsay I?Love?nix

  • ____________

  • <?I?Love?nix?>

  • ------------

  • \?^__^

  • \?(oo)\_______

  • (__)\?)\/\

  • ||----w?|

  • ||||

  • 如果用管道將‘fortune command’命令重定向到cowsay會怎樣呢?

    root@tecmint:~# fortune | cowsay

  • _________________________________________

  • /?Q:How?many?Oregonians?does it take to \

  • |?screw?in?a light bulb??A:Three.One?to?|

  • |?screw?in?the light bulb?and?two to fend?|

  • |?off all those?|

  • ||

  • |Californians?trying to share the?|

  • \ experience./

  • -----------------------------------------

  • \?^__^

  • \?(oo)\_______

  • (__)\?)\/\

  • ||----w?|

  • ||||

  • 提示:‘|’是管道命令符。通常它是將一個命令的輸出作為下一個命令的輸入。在上面的例子中‘fortune’的輸出作為‘cowsay’命令的輸出。管道命令會經常用在腳本和程序編寫中。

    xcowsay是一個圖形界面程序。它與cowsay類似只是以一種圖形的方式來表達,可以說是X版本的cowsay。

  • apt-get?insatll xcowsay

  • yum install xcowsay

  • 輸出

  • root@tecmint:~#?xcowsay I?Love?nix

  • cowthink是另一個命令。運行“cowthink Linux is sooo funny ”看看它與cowsay的不同吧。

  • apt-get?insatll cowthink

  • yum install cowthink

  • 輸出

  • root@tecmint:~#?cowthink?....Linuxis?sooo funny

  • _________________________

  • (....Linuxis?sooo funny?)

  • -------------------------

  • o?^__^

  • o?(oo)\_______

  • (__)\?)\/\

  • ||----w?|

  • ||||

  • 8. 命令:yes

    yes 是一個非常有趣又有用的命令,尤其對于腳本編寫和系統管理員來說,它可以自動地生成預先定義的響應或者將其傳到終端。

  • root@tecmint:~#?yes I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • I?LoveLinux

  • 提示: (直到你按下ctrl+c才停止)

    9. 命令: toilet

    什么?你在開玩笑嗎! 當然沒有,但肯定的是這個命令的名字太搞了,我也不知道這個命令的名字從何而來。

    安裝toilet

  • root@tecmint:~#?apt-get?install toilet

  • root@tecmint:~#?yum install toilet

  • 輸出

  • root@tecmint:~#?toilet tecmint

  • mmmmmmm?" m

  • # mmm mmm mmmmm mmm m mm mm#mm mmm mmm mmmmm

  • # #"# #" " # # # # #" # # #" " #" "# # # #

  • # #"""" # # # # # # # # # # # # # #

  • # "#mm" "#mm" # # # mm#mm # # "mm # "#mm" "#m#" # # #

  • 這個命令甚至提供了一些顏色和字體格式。

  • root@tecmint:~#?toilet?-f mono12?-F metal?Tecmint.com

  • 提示:Figlet?是另外一個與toilet產生的效果類似的命令。

    10. 命令:cmatrix

    你可能看多好萊塢的電影‘***帝國’并陶醉于被賦予Neo的能看到在矩陣中任何事物的能力,或者你會想到一幅類似于‘Hacker’的桌面的生動畫面。

    安裝 cmatrix

  • root@tecmint:~#?apt-get?install cmatrix

  • root@tecmint:~#?yum install cmatrix

  • 輸出

  • root@tecmint:~#?cmatrix

  • 11. 命令: oneko

    可能你堅信Linux的鼠標指針永遠是同樣的黑色或白色一點兒也不生動,那你就錯了。“oneko”是一個會讓一個“Jerry”你的鼠標指針附著到你鼠標上的一個軟件包。

    安裝 oneko

  • root@tecmint:~#?apt-get?install oneko

  • root@tecmint:~#?yum install oneko

  • 輸出

  • root@tecmint:~#?oneko

  • 提示:關閉運行著oneko的終端時,Jerry也會隨之消失,重新啟動終端時也不會再出項。你可以將這個程序添加到啟動選項中然后繼續使用它。

    12. Fork×××

    這是一段非常欠抽的代碼。運行這個命令的后果自己負責。這個命令其實是一個fork×××,它會以指數級的自乘,直到所有的系統資源都被利用了或者系統掛起(想要見識這個命令的威力你可以試一次這個命令,但是后果自負,記得在運行它之前關掉并保存其它所有程序和文件)。

  • root@tecmint:~#:(){:|:&}:

  • 13. 命令:while

    下面的”while“命令是一個腳本,這個腳本可以為你提供彩色的日期和文件直到你按下中斷鍵(ctrl+c)。復制粘貼這個命令到你的終端。

  • root@tecmint:~#whiletrue;do?echo?"$(date '+%D %T' | toilet -f term -F border --gay)";?sleep?1;done

  • 提示:以上腳本通過下面的修改也會產生類似的輸出但是還是有點不同的,在你的終端試試吧。

  • root@tecmint:~#whiletrue;do?clear;?echo?"$(date '+%D %T' | toilet -f term -F border --gay)";?sleep?1;done

  • 14. 命令: espeak

    將你的多媒體音箱的音量調到最大,然后在將這個命令復制到你的終端,來看看你聽到上帝的聲音時的反應吧。

    安裝 espeak

  • root@tecmint:~#?apt-get?install espeak

  • root@tecmint:~#?yum install espeak

  • 輸出

  • root@tecmint:~#?espeak?"Tecmint is a very good website dedicated to Foss Community"

  • 15. 命令: aafire

    在你的終端放一把火如何。把這個“aafire”敲到你的終端,不需要什么引號看看這神奇的一幕吧。按下任意鍵中指該程序。

    安裝 aafire

  • root@tecmint:~#?apt-get?install libaa-bin

  • 輸出

  • root@tecmint:~#?aafire

  • 16. 命令: bb

    首先安裝“apt-get install bb”,然后敲入“bb”看看會發生什么吧。

  • root@tecmint:~#?bb

  • 17. 命令: url

    如果在你的朋友面前用命令行來改變你的?twitter status?會不會很酷呢。用你的用戶名密碼你想要的狀態分別替換username, password?和“your status message“就可以了。

  • root@tecmint:~#?url?-u?YourUsername:YourPassword-d status="Your status message"?http://twitter.com/statuses/update.xml

  • 18. ASCIIquarium

    想要在終端弄一個水族館該,怎么辦?

  • root@tecmint:~#?apt-get?install libcurses-perl

  • root@tecmint:~#?cd?/tmp

  • root@tecmint:~#?wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz

  • root@tecmint:~#?tar?-zxvf?Term-Animation-2.4.tar.gz

  • root@tecmint:~#?cd?Term-Animation-2.4/

  • root@tecmint:~#?perl?Makefile.PL?&&?make?&&?make test

  • root@tecmint:~#?make install

  • 安裝 ASCIIquarium

    下載并安裝ASCIIquarium

  • root@tecmint:~#?cd?/tmp

  • root@tecmint:~#?wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz

  • root@tecmint:~#?tar?-zxvf asciiquarium.tar.gz

  • root@tecmint:~#?cd asciiquarium_1.1/

  • root@tecmint:~#?cp asciiquarium?/usr/local/bin

  • root@tecmint:~#?chmod?0755/usr/local/bin/asciiquarium

  • 最后在終端運行“asciiquarium”或者“/usr/local/bin/asciiquarium”,記得不要加引號,神奇的一幕將在你眼前展現。

  • root@tecmint:~#?asciiquarium

  • 19. 命令: funny manpages

    首先安裝“apt-get install funny-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:~#?man baby

  • 20. Linux Tweaks

    該到了做一些優化的時候了

  • root@tecmint:~#?world

  • bash:?world:not?found

  • root@tecmint:~#?touch girls\ boo**

  • touch:?cannot touch?`girls boo**`:Permission?denied

  • root@tecmint:~#?nice man woman

  • No?manual entry?for?woman

  • root@tecmint:~#^How?did the sex change operation go?^

  • bash::s^How?did the sex change operation go?^:?substitution failed

  • root@tecmint:~#%blow

  • bash:?fg:%blow:no?such job

  • root@tecmint:~#?make love

  • make:***No?rule to make target?`love`.Stop.

  • $?[?whereis?my?brain?

  • sh:2:[:?missing?]

  • %?man:?why did you?get?a divorce?

  • man::Too?many arguments.

  • %!:say,?what?is?saccharine?

  • Bad?substitute.

  • server@localhost:/srv$ \(-

  • bash:(-:?command?not?found

  • Linux總是sexy:who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep(如果你知道我的意思,汗!)

    還有一些其它的命令,只是這些命令并不能在所有的系統上運行,所以本文沒有涉及到。比如說dog , filter, banner

    使用愉快,你可以稍后再對我說謝謝:)您的評價是我們前進的不竭動力。告訴我們你最喜歡的命令。繼續關注,不久我會有另一篇值得閱讀的文章。

    轉載于:https://blog.51cto.com/moerjinrong/1900941

    總結

    以上是生活随笔為你收集整理的Linux命令及Linux终端的20个趣事的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。