1. 程式人生 > >screenfetch 和 linux_logo安裝使用

screenfetch 和 linux_logo安裝使用

logo screefeth linux

1、screenFetch 是一個能夠在截屏中顯示系統/主題信息的命令行工具。它可以在 Linux,OS X,FreeBSD 以及其它的許多類Unix系統上使用。來自 man 手冊的說明:

可以用來生成那些漂亮的終端主題信息和用 ASCII 構成的發行版標誌,就像如今你在別人的截屏裏看到的那樣。它會自動檢測你的發行版並顯示 ASCII 版的發行版標誌,並且在右邊顯示一些有價值的信息。

安裝 screenfetch

克隆screenFectch庫:
git clone https://github.com/KittyKatt/screenFetch.git
Cloning into ‘screenFetch‘...
remote: Counting objects: 3659, done.
remote: Total 3659 (delta 0), reused 0 (delta 0), pack-reused 3659
Receiving objects: 100% (3659/3659), 3.60 MiB | 993.00 KiB/s, done.
Resolving deltas: 100% (2111/2111), done.
移動到指定文件夾下:

#mv screenFetch /usr/bin/

添加可執行權限:

#chmod +x /usr/bin/screenFetch/

執行命令:

#/usr/bin/screenFetch/screenfetch-dev
                  ..                    [email protected]
                 .PLTJ.                  OS: CentOS 7.3.1611 Core
                <><><><>                 Kernel: x86_64 Linux 3.10.0-514.el7.x86_64
       KKSSV‘ 4KKK LJ KKKL.‘VSSKK        Uptime: 2d 21h 20m
       KKV‘ 4KKKKK LJ KKKKAL ‘VKK        Packages: 939
       V‘ ‘ ‘VKKKK LJ KKKKV‘ ‘ ‘V        Shell: bash 4.2.46
       .4MA.‘ ‘VKK LJ KKV‘ ‘.4Mb.        CPU: Intel Core i9-7900K @ 6x 0MHz [100.0°C]
     . KKKKKA.‘ ‘V LJ V‘ ‘.4KKKKK .      GPU: svgadrmfb
   .4D KKKKKKKA.‘‘ LJ ‘‘.4KKKKKKK FA.    RAM: 949MiB / 7806MiB
  <QDD ++++++++++++  ++++++++++++ GFD>  
   ‘VD KKKKKKKK‘.. LJ ..‘KKKKKKKK FV    
     ‘ VKKKKK‘. .4 LJ K. .‘KKKKKV ‘     
        ‘VK‘. .4KK LJ KKA. .‘KV‘        
       A. . .4KKKK LJ KKKKA. . .4       
       KKA. ‘KKKKK LJ KKKKK‘ .4KK       
       KKSSA. VKKK LJ KKKV .4SSKK       
                <><><><>                
                 ‘MKKM‘

2、linux_logo 程序生成一個彩色的 ANSI 版企鵝圖片,還包含一些來自 /proc 的系統信息

安裝

只需按照你的 Linux 發行版安裝相應的軟件包即可:

Debian/Ubutnu/Mint
#apt-get install linux_logo
 
CentOS/RHEL/舊版 Fedora
#yum install linux_logo
 
Fedora Linux v22+ 或更新版本
# dnf install linux_logo

運行:

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

Linux Version 3.10.0-514.el7.x86_64, Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
         Two 4.2GHz Intel i9 Processors, 8GB RAM, 16800 Bogomips Total
                                    kvm-host
可以用這個命令查看內置的標誌列表:

$ linux_logo -f -L list
Available Built-in Logos:
        Num     Type    Ascii   Name            Description
        1       Banner  Yes     bsd_banner      FreeBSD Logo
        2       Classic Yes     irix            Irix Logo
        3       Classic Yes     bsd             FreeBSD Logo
        4       Banner  Yes     solaris         The Default Banner Logos
        5       Classic Yes     aix             AIX Logo
        6       Classic Yes     classic         The Default Classic Logo
        7       Banner  Yes     debian_banner   Debian Banner (white) 
        8       Banner  Yes     mandrake_banner Mandrake(TM) Linux Banner
        9       Banner  Yes     pld             PLD Linux banner
        10      Banner  Yes     suse            SUSE Logo
        11      Banner  Yes     sourcemage_ban  Source Mage GNU/Linux banner
        12      Classic Yes     gnu_linux       Classic GNU/Linux
        13      Classic Yes     core            Core Linux Logo
        14      Classic Yes     debian          Debian Swirl Logos
        15      Banner  Yes     slackware       Slackware Logo
        16      Banner  Yes     mandriva        Mandriva(TM) Linux Banner
        17      Banner  Yes     redhat          RedHat Banner (white) 
        18      Banner  Yes     ubuntu          Ubuntu Logo
        19      Classic Yes     debian_old      Debian Old Penguin Logos 
        20      Banner  Yes     sme             SME Server Banner Logo
        21      Banner  Yes     sourcemage      Source Mage GNU/Linux large
        22      Banner  Yes     mandrake        Mandrakelinux(TM) Banner
        23      Banner  Yes     banner          The Default Banner Logo
        24      Classic Yes     classic-simp    Classic No Dots Or Letters
        25      Classic Yes     classic-nodots  The Classic Logo, No Periods
        26      Banner  Yes     banner-simp     Simplified Banner 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_logo -L 14
                               
         _sudZUZ#Z#XZo=_         DDDD   EEEEEE BBBB   IIIIII  AAAA   NN   NN
      _jmZZ2!!~---~!!X##wa       DD DD  EE     BB BB    II   AA  AA  NNN  NN
   .<wdP~~            -!YZL,     DD  DD EEEEE  BBBBB    II   AAAAAA  NNNN NN
  .mX2‘       _%aaa__     XZ[.   DD DD  EE     BB  BB   II   AA  AA  NN NNNN
  oZ[      _jdXY!~?S#wa   ]Xb;   DDDD   EEEEEE BBBBB  IIIIII AA  AA  NN   NN
 _#e‘     .]X2(     ~Xw|  )XXc 
.2Z`      ]X[.       xY|  ]oZ(   Linux Version 3.10.0-514.el7.x86_64
.2#;      )3k;     _s!~   jXf`   Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
 1Z>      -]Xb/    ~    __#2(    Two 4.2GHz Intel i9 Processors, 8GB RAM
 -Zo;       +!4ZwaaaauZZXY‘      16800 Bogomips Total
  *#[,        ~-?!!!!!!-~        kvm-host
   XUb;.                       
    )YXL,,                     
      +3#bc,                   
        -)SSL,,                
           ~~~~~
或者只是隨機看看一些 Linux 標誌:

$ linux_logo -f -L random_xy
                SSSSS  OOOO  L        AA   RRRRR   III  SSSSS
               S      O    O L       A  A  R    R   I  S
               S      O    O L      A    A R    R   I  S
                SSSS  O    O L      AAAAAA RRRRR    I   SSSS
                    S O    O L      A    A R R      I       S
                    S O    O L      A    A R  R     I       S
               SSSSS   OOOO  LLLLLL A    A R   R   III SSSSS

Linux Version 3.10.0-514.el7.x86_64, Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
         Two 4.2GHz Intel i9 Processors, 8GB RAM, 16800 Bogomips Total
                                    kvm-host

3、獲取幫助

輸入下列命令:

  1. $ screefetch -h

  2. $ linux_logo -h

4、可以在登錄界面輸出你的 Linux 發行版徽標。要輸出默認徽標,你可以在 ~/.bashrc文件的最後添加以下內容

if [ -f /usr/bin/linux_logo ]; then linux_logo; fi

如果沒有~/.bashrc 文件,你需要在當前用戶的 home 目錄下新建一個

在添加以上內容後,你只需要註銷並重新登錄即可看到你的發行版的默認徽標

其實你也可以在登錄後輸出任意隨機圖標,只需加入以下內容:

if [ -f /usr/bin/linux_logo ]; then linux_logo -L random_xy; fi

Last login: Thu Aug 24 00:05:10 2017 from 192.168.0.190

   ####   ###                 ###
  ##  ##   ##                  ##
  ##       ##   ####    ####   ##  ### ###        ### ####   ### ###   ####
   ###     ##      ##  ##      ## ##    ##   ##   ##     ##   ###  ## ##  ##
     ##    ##   #####  ##      ####      ## #### ##   #####   ##      ######
  ##  ##   ##  ##  ##  ##      ## ##      ###  ###   ##  ##   ##      ##
|  ####   ####  ######  ####  ###  ###    ##    ##    ######  ##       #####
`------------------------------------------------------------- l  i  n  u  x

也可以直接指定徽標所在的位置來顯示你自己的徽標。

$ linux_logo -D /path/to/ASCII/logo

如果你想使用 ASCII 徽標而不是含有顏色的 ANSI 徽標,則使用如下命令

$ linux_logo -a > /etc/issue.net

5、用命令在終端循環打印logo:

for i in {1..30};do linux_logo -f -L $i;sleep 2;done
       >>>> OOO        IIIIII IIIIII IIIIII II  II
     >>>>>N NOOOO        II   II  II   II    IIII
   OOO>> NN NN OOOO      II   IIIIII   II     II
    OOOO NN NN  NNN      II   II II    II    IIII
      OOONN NNNNN      IIIIII II  II IIIIII II  II
 OOOO  OOON NNN   NNN
 NNOOO >>OONN >> NNNN
 NN  OOOO    NNNNN NN  Linux Version 3.10.0-514.el7.x86_64
 NN>>>OOOO>>>NN >> NN  Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
 NN>>  >NN> NN>> >>NN  Two 4.2GHz Intel i9 Processors, 8GB RAM
 NN  >>>NN  NN >>  NN  16800 Bogomips Total
    >>> NN  NN  >>     kvm-host
   OOO  NN  NN   OOO 
    OOO NN  NN OOO   
     OOONN  NNOOO    
      OONN  NNO      


             ,        ,
            /(        )`
            \ \___   / |
            /- _  `-/  ‘
           (/\/ \ \   /           / /   | `               O O   ) /    |
           `-^--‘`<     ‘  Linux Version 3.10.0-514.el7.x86_64
          (_.)  _  )   /  Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
           `.___/`    /  Two 4.2GHz Intel i9 Processors, 8GB RAM
             `-----‘ /  16800 Bogomips Total
<----.     __ / __   \  kvm-host
<----|====O)))==) \) /====
<----‘    `--‘ `.__,‘              |        |
              \       /       /         ______( (_  / \______/
       ,‘  ,-----‘   |
       `--{__________)

                SSSSS  OOOO  L        AA   RRRRR   III  SSSSS
               S      O    O L       A  A  R    R   I  S
               S      O    O L      A    A R    R   I  S
                SSSS  O    O L      AAAAAA RRRRR    I   SSSS
                    S O    O L      A    A R R      I       S
                    S O    O L      A    A R  R     I       S
               SSSSS   OOOO  LLLLLL A    A R   R   III SSSSS

Linux Version 3.10.0-514.el7.x86_64, Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
         Two 4.2GHz Intel i9 Processors, 8GB RAM, 16800 Bogomips Total
                                    kvm-host


                            AAAA  IIIIII XX  XX
                           AA  AA   II    XXXX
  ()  ()  ()  ()  ()  ()   AAAAAA   II     XX
                           AA  AA   II    XXXX
  ()  ()  ()  ()  ()  ()   AA  AA IIIIII XX  XX
                         
  ()  ()  ()  ()  ()  () 
                           Linux Version 3.10.0-514.el7.x86_64
  ()  ()  ()  ()  ()  ()   Compiled #1 SMP Tue Nov 22 16:42:41 UTC 2016
                           Two 4.2GHz Intel i9 Processors, 8GB RAM
  ()  ()  ()  ()  ()  ()   16800 Bogomips Total
                           kvm-host
  ()  ()  ()  ()  ()  ()


本文出自 “實踐出真知” 博客,請務必保留此出處http://m51cto.blog.51cto.com/53087/1958840

screenfetch 和 linux_logo安裝使用