linux下的彩蛋和各种有趣的命令

linux下的彩蛋和各种有趣的命令Linux

screenfetch
一个显示系统信息和主题信息的命令

使用方法
输入screenfetch

效果图

linux下的彩蛋和各种有趣的命令



Linuxlogo
显示linux版本logo图片及系统信息
使用方法

输入linuxlogo

效果图

linux下的彩蛋和各种有趣的命令

查看内置的所有图案
[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.

指定输出图案

linux下的彩蛋和各种有趣的命令

循环输出

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

让终端变得有意思
在终端输入sudo visudo
在“Defaults”末尾(文件的前半部分)添加一行“Defaults insults”。
保存
之后当你使用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] ~/桌面 $ 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这个工具和它差不多

linux下的彩蛋和各种有趣的命令


aafire
这个会在屏幕上显示除一团燃烧着的火焰

安装
sudo apt install libaa-bin

只要在终端中输入aafire就可以查看到一团火焰了

oneko
如果你觉得每天对着屏幕很无聊,那这个命令就可以帮助你了,向终端中输入oneko,会跳出一只小猫来陪你玩耍

xeyes
输入这个命令屏幕上会显示出一只眼睛,眼睛还会跟着鼠标转

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