天天看點

linux下的彩蛋和各種有趣的指令screenfetchlinuxlogo讓終端變得有意思slcmatrixrevlolcatCowsayapt-get mooaptitude moofortunetoiletaafireonekoxeyesbbpvrigyescalfactortelnetespeak

screenfetch

一個顯示系統資訊和主題資訊的指令

使用方法

輸入

screenfetch

效果圖

[email protected]
 MMMMMMMMMMMMMMMMMMMMMMMMMmds+.        OS: Mint 18.1 serena
 MMm----::-://oymNMd+`     Kernel: x86_64 Linux 4.4.0-57-generic
 MMd      /++                -sNMd:    Uptime: 2h 36m
 MMNso/`  dMM    `.::-. .-::.` .hMN:   Packages: 2557
 ddddMMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.3.46
     NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 1920x1080
     NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 3.2.7
     NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
     NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: macOS Sierra (macOS Sierra)
     NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: macOS Sierra [GTK2/3]
     hMM- +MMd/-------...-:sdds  dMM   Icon Theme: Flat Remix
     -NMm- :hNMNNNmdddddddddy/`  dMM   Font: Noto Sans Bold 17
      -dMNs-``-::::-------.``    dMM   CPU: Intel Core i5-5200U CPU @ 2.7GHz
       `/dMNmy+/:-------------:/yMMM   GPU: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
          ./ydNMMMMMMMMMMMMMMMMMMMMM   RAM: 1636MiB / 3866MiB
             \.MMMMMMMMMMMMMMMMMMM  
           

linuxlogo

顯示linux版本logo圖檔及系統資訊

使用方法

輸入

linuxlogo

效果圖

_,met$$$$$gg.                                                           
     ,g$$$$$$$$$$$$$$$P.                                                        
   ,g$$P""       """Y$$.".                                                      
  ,$$P'              `$$$.                                                      
',$$P       ,ggs.     `$$b:                                                     
`d$$'     ,$P"'   .    $$$                               ,#.                    
 $$P      d$'     ,    $$P      ##:          :##        :###:                   
 $$:      $$.   -    ,d$$'      ##'          `##         `#'                    
 $$;      Y$b._   _,d$P'    __  ##     __     ##  __      _     __          _   
 Y$$.    `.`"Y$$$$P"'     ,####:##  ,######.  ##.#####. :### ,######. ###.####: 
 `$$b      "-.__         ,##' `###  ##:  :##  ###' `###  ##' #:   `## `###' `##:
  `Y$$b                  ##    `##  ##    ##  ##'   `##  ##    ___,##  ##:   `##
   `Y$$.                 ##     ##  #######:  ##     ##  ##  .#######  ##'    ##
     `$$b.               ##     ##  ##'       ##     ##  ##  ##'  `##  ##     ##
       `Y$$b.            ##.   ,##  ##        ##    ,##  ##  ##    ##  ##     ##
         `"Y$b._         :#:._,###  ##:__,##  ##:__,##' ,##. ##.__:##. ##     ##
             `""""       `:#### ###  ######'  `######'  #### `#####"## ##     ##

Linux Version 4.4.0-57-generic, Compiled #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016
        Four 2.2GHz Intel i5 Processors, 3.9GB RAM, 17558 Bogomips Total
                                    bboysoul
           

檢視内置的所有圖案

[email protected] ~/桌面 $ linux_logo -f -L list

Available Built-in Logos:
    Num Type    Ascii   Name        Description
    1   Classic Yes aix     AIX Logo
    2   Classic Yes bsd     FreeBSD Logo
    3   Banner  Yes bsd_banner  FreeBSD Logo
    4   Classic Yes irix        Irix Logo
    5   Classic Yes openbsd     OpenBSD Logo
    6   Banner  Yes openbsd_banner  OpenBSD Logo
    7   Banner  Yes solaris     The Default Banner Logos
    8   Banner  Yes banner-simp Simplified Banner Logo
    9   Banner  Yes banner      The Default Banner Logo
    10  Classic Yes classic-nodots  The Classic Logo, No Periods
    11  Classic Yes classic-simp    Classic No Dots Or Letters
    12  Classic Yes classic     The Default Classic Logo
    13  Classic Yes core        Core Linux Logo
    14  Banner  Yes debian_banner_2 Debian Banner 2
    15  Banner  Yes debian_banner   Debian Banner (white) 
    16  Classic Yes debian_old  Debian Old Penguin Logos 
    17  Classic Yes debian      Debian Swirl Logos
    18  Classic Yes gnu_linux   Classic GNU/Linux
    19  Banner  Yes mandrake_banner Mandrake(TM) Linux Banner
    20  Banner  Yes mandrake    Mandrakelinux(TM) Banner
    21  Banner  Yes mandriva    Mandriva(TM) Linux Banner
    22  Banner  Yes pld     PLD Linux banner
    23  Classic Yes raspi       An ASCII Raspberry Pi logo
    24  Banner  Yes redhat      RedHat Banner (white) 
    25  Banner  Yes slackware   Slackware Logo
    26  Banner  Yes sme     SME Server Banner Logo
    27  Banner  Yes sourcemage_ban  Source Mage GNU/Linux banner
    28  Banner  Yes sourcemage  Source Mage GNU/Linux large
    29  Banner  Yes suse        SUSE Logo
    30  Banner  Yes ubuntu      Ubuntu Logo

Do "linux_logo -L num" where num is from above to get the appropriate logo.
Remember to also use -a to get ascii version.
           

指定輸出圖案

[email protected] ~/桌面 $ linux_logo -f -L 3


             ,        ,
            /(        )`
            \ \___   / |
            /- _  `-/  '
           (/\/ \ \   /\
           / /   | `    \
           O O   ) /    |
           `-^--'`<     '
          (_.)  _  )   /
           `.___/`    /
             `-----' /
<----.     __ / __   \
<----|====O)))==) \) /====
<----'    `--' `.__,' \
             |        |
              \       /       /\
         ______( (_  / \______/
       ,'  ,-----'   |
       `--{__________)

Linux Version 4.4.0-57-generic, Compiled #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016
       Four 2.51GHz Intel i5 Processors, 3.9GB RAM, 17558 Bogomips Total
                                    bboysoul
           

循環輸出

for ((i=1;i<=30;i++));do linux_logo -f -L $i;sleep 0.1;done

讓終端變得有意思

  1. 在終端輸入

    sudo visudo

  2. 在“Defaults”末尾(檔案的前半部分)添加一行“Defaults insults”。
  3. 儲存

    之後當你使用sudo,在輸入密碼的時候,如果輸入錯誤了,那麼終端開始胡說八道了

    示範

[email protected] ~/桌面 $ sudo ls
[sudo] bboysoul 的密碼: 
Have a gorilla...
[sudo] bboysoul 的密碼: 
And with that remarks folks, the case of the Crown vs yourself was proven.
[sudo] bboysoul 的密碼: 
sudo: 3 次錯誤密碼嘗試
[email protected] ~/桌面 $ sudo ls
[sudo] bboysoul 的密碼: 
My pet ferret can type better than you!
[sudo] bboysoul 的密碼: 
Your mind just hasn't been the same since the electro-shock, has it?
[sudo] bboysoul 的密碼: 
sudo: 3 次錯誤密碼嘗試
[email protected] ~/桌面 $ 
           

sl

當你輸入sl或者LS後螢幕會跑出一個蒸汽火車出來

不信你試試

cmatrix

這個指令的作用就是讓終端顯示和黑客帝國一樣的滾動的文字

用法

在終端輸入

cmatrix

rev

這個指令可以将所有的文本逆序輸出

示範

[email protected] ~/桌面 $ echo bboysoul is a bad guy
bboysoul is a bad guy
[email protected] ~/桌面 $ echo bboysoul is a bad guy | rev
yug dab a si luosyobb
           

lolcat

這個指令可以讓你輸出的文字變為彩色

示範

[email protected] ~/桌面 $ echo bboysoul is a bad guy | lolcat
bboysoul is a bad guy
           

當然上面的輸出是不會變成彩色的

Cowsay

cowsay 是一個列印一頭牛然後讓那頭牛說出任何你想說的話的指令

示範

[email protected] ~/桌面 $ cowsay bboysoul is a bad guy
 _______________________
< bboysoul is a bad guy >
 -----------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
           

apt-get moo

這個彩蛋和cowsay 差不多也是列印一頭牛,不過你不能讓這頭牛說出你想說的話

示範

[email protected] ~/桌面 $ apt-get moo 
                 (__) 
                 (oo) 
           /------\/ 
          / |    ||   
         *  /\---/\ 
            ~~   ~~   
..."Have you mooed today?"...
           

aptitude moo

如果你把moo放在aptitude後面會怎麼樣呢?,如果你再在moo後加上-v或-vv或-vvv或者跟多的v呢?

示範

[email protected] ~/桌面 $ aptitude moo
這個程式裡沒有複活節彩蛋。
[email protected] ~/桌面 $ aptitude moo -v
這個程式裡确實沒有複活節彩蛋。
[email protected] ~/桌面 $ aptitude moo -vv
我不是已經告訴你這個程式裡沒有複活節彩蛋了嗎?
[email protected] ~/桌面 $ aptitude moo -vvv
停下來!
[email protected] ~/桌面 $ aptitude moo -vvvv
好吧,好吧,如果我給你複活節彩蛋,你會停手嗎?
[email protected]boysoul ~/桌面 $ aptitude moo -vvvvv
好吧,你赢了。

                               /----\
                       -------/      \
                      /               \
                     /                |
   -----------------/                  --------\
   ----------------------------------------------
[email protected] ~/桌面 $ aptitude moo -vvvvvv
這是什麼?當然是一隻大象被一條蛇吞了。
           

fortune

這個指令會随機輸出一段話

示範

[email protected] ~/桌面 $ fortune 
No live organism can continue for long to exist sanely under conditions of
absolute reality; even larks and katydids are supposed, by some, to dream.
Hill House, not sane, stood by itself against its hills, holding darkness
within; it had stood so for eighty years and might stand for eighty more.
Within, walls continued upright, bricks met neatly, floors were firm, and
doors were sensibly shut; silence lay steadily against the wood and stone
of Hill House, and whatever walked there, walked alone.
        -- Shirley Jackson, "The Haunting of Hill House"
           

如果你安裝了fortune-zh,你在終端輸入fortune-zh後,會輸出唐詩三百首

示範

[email protected] ~/桌面 $ fortune-zh
《登樓》
作者:杜甫
花近高樓傷客心,萬方多難此登臨。
錦江春色來天地,玉壘浮雲變古今。
北極朝廷終不改,西山寇盜莫相侵。
可憐後主還祠廟,日暮聊為梁父吟。
           

注:此時再敲入fortune回車,輸出的内容包括中、英文,你可以将它和lolcat,rev,cowsay一起使用,除此之外和cowsay類似的指令有xcowsay和cowthink

toilet

它是能用字母拼寫出更大字母的工具,figlet這個工具和它差不多

示範

[email protected] ~/桌面 $ toilet bboysoul is a bad guy
                                                                             
 #      #                                         ""#             "          
 #mmm   #mmm    mmm   m   m   mmm    mmm   m   m    #           mmm     mmm  
 #" "#  #" "#  #" "#  "m m"  #   "  #" "#  #   #    #             #    #   " 
 #   #  #   #  #   #   #m#    """m  #   #  #   #    #             #     """m 
 ##m#"  ##m#"  "#m#"   "#    "mmm"  "#m#"  "mm"#    "mm         mm#mm  "mmm" 
                       m"                                                    
                      ""                                                     
                                                                             
                      #                 #                                    
         mmm          #mmm    mmm    mmm#          mmmm  m   m  m   m        
        "   #         #" "#  "   #  #" "#         #" "#  #   #  "m m"        
        m"""#         #   #  m"""#  #   #         #   #  #   #   #m#         
        "mm"#         ##m#"  "mm"#  "#m##         "#m"#  "mm"#   "#          
                                                   m  #          m"          
                                                    ""          ""           
           

aafire

這個會在螢幕上顯示除一團燃燒着的火焰

安裝

sudo apt install libaa-bin

隻要在終端中輸入aafire就可以檢視到一團火焰了

oneko

如果你覺得每天對着螢幕很無聊,那這個指令就可以幫助你了,向終端中輸入oneko,會跳出一隻小貓來陪你玩耍

xeyes

輸入這個指令螢幕上會顯示出一隻眼睛,眼睛還會跟着滑鼠轉

bb

這個指令不知道怎麼介紹,去嘗試一下吧,到最後會放出一些音樂的

pv

你是不是經常在電影中看到一串字勻速的顯示出來,好像有人在打鍵盤,pv指令可以做到

示範

[email protected] ~/桌面 $ echo bboysoul is a bad guy | pv -qL 10
bboysoul is a bad guy
           

當然在這裡是顯示不出動畫的

rig

這個指令會随機顯示出一些人名,地名記錄等

示範

[email protected] ~/桌面 $ rig
Terry Howe
215 Shalton Dr
Ames, IA  50010
(515) xxx-xxxx
           

yes

在這個指令後跟上文字會一直輸出這些文字

示範

[email protected] ~/桌面 $ yes bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
bboysoul is a bad guy
           

cal

這個指令可以列印月曆

示範

[email protected] ~/桌面 $ cal
      一月 2017         
日 一 二 三 四 五 六  
 1  2  3  4  5  6  7  
 8  9 10 11 12 13 14  
15 16 17 18 19 20 21  
22 23 24 25 26 27 28  
29 30 31
           

factor

這個指令可以分解因數

示範

[email protected] ~/桌面 $ factor 15
15: 3 5
[email protected] ~/桌面 $ factor 12
12: 2 2 3
           

telnet

這個不是有趣的指令,但是你可以用它來看星球大戰

用法

telnet towel.blinkenlights.nl
           

espeak

這個會把在它後面的字元都讀出來

用法

espeak bboysoul is a bad guy
           

好玩的指令總結得差不多了,如果有要補充的歡迎聯系我繼續添加

繼續閱讀