用 screenfetch 和 linux_logo 顯示帶有酷炫 Linux 標誌的基本硬體資訊

6 贊 回覆發表於2015-11-02

想在螢幕上顯示出你的 Linux 發行版的酷炫標誌和基本硬體資訊嗎?不用找了,來試試超讚的 screenfetch 和 linux_logo 工具。

Linux Logo

來看看 screenfetch 吧

screenFetch 是一個能夠在截圖中顯示系統/主題資訊的命令列指令碼。它可以在 Linux,OS X,FreeBSD 以及其它的許多類Unix系統上使用。來自 man 手冊的說明:

這個方便的 Bash 指令碼可以用來生成那些漂亮的終端主題資訊和用 ASCII 構成的發行版標誌,就像如今你在別人的截圖裡看到的那樣。它會自動檢測你的發行版並顯示 ASCII 版的發行版標誌,並且在右邊顯示一些有價值的資訊。

在 Linux 上安裝 screenfetch

開啟終端應用。在基於 Debian 或 Ubuntu 或 Mint 的系統上只需要輸入下列 apt-get 命令

$ sudo apt-get install screenfetch

圖一:用 apt-get 安裝 screenfetch

如果源裡面沒有這個軟體,可以採用如下方法:

wget https://github.com/KittyKatt/screenFetch/archive/master.zip
unzip master.zip
sudo mv screenFetch-master/screenfetch-dev /usr/bin/screenfetch

在 Mac OS X 上安裝 screenfetch

輸入下列命令:

$ brew install screenfetch

圖二:用 brew 命令安裝 screenfetch

在 FreeBSD 上安裝 screenfetch

輸入下列 pkg 命令:

$ sudo pkg install sysutils/screenfetch

圖三:在 FreeBSD 用 pkg 安裝 screenfetch

在 Fedora 上安裝 screenfetch

輸入下列 dnf 命令:

$ sudo dnf install screenfetch

圖四:在 Fedora 22 用 dnf 安裝 screenfetch

我該怎麼使用 screefetch 工具?

只需輸入以下命令:

$ screenfetch

這是不同系統的輸出:

Fedora 上的 Screenfetch

OS X 上的 Screenfetch

FreeBSD 上的 Screenfetch

Debian 上的 Screenfetch

獲取截圖

要獲取截圖並儲存成檔案,輸入:

$ screenfetch -s

你會看到一個檔案 ~/Desktop/screenFetch-*.jpg。獲取截圖並直接上傳到 imgur,輸入:

$ screenfetch -su imgur

輸出示例:

                 -/+:.          veryv@Viveks-MacBook-Pro
                :++++.          OS: 64bit Mac OS X 10.10.5 14F27
               /+++/.           Kernel: x86_64 Darwin 14.5.0
       .:-::- .+/:-``.::-       Uptime: 3d 1h 36m
    .:/++++++/::::/++++++/:`    Packages: 56
  .:///////////////////////:`   Shell: bash 3.2.57
  ////////////////////////`     Resolution: 2560x1600 1920x1200
 -+++++++++++++++++++++++`      DE: Aqua
 /++++++++++++++++++++++/       WM: Quartz Compositor
 /sssssssssssssssssssssss.      WM Theme: Blue
 :ssssssssssssssssssssssss-     Font: Not Found
  osssssssssssssssssssssssso/`  CPU: Intel Core i5-4288U CPU @ 2.60GHz
  `syyyyyyyyyyyyyyyyyyyyyyyy+`  GPU: Intel Iris
   `ossssssssssssssssssssss/    RAM: 6405MB / 8192MB
     :ooooooooooooooooooo+.
      `:+oo+/:-..-:/+o+/-      

Taking shot in 3.. 2.. 1.. 0.
==>  Uploading your screenshot now...your screenshot can be viewed at http://imgur.com/HKIUznn

你可以訪問 http://imgur.com/HKIUznn 來檢視上傳的截圖。

再來看看 linux_logo

linux_logo 程式生成一個彩色的 ANSI 版企鵝圖片,還包含一些來自 /proc 的系統資訊。

安裝

只需按照你的 Linux 發行版輸入對應的命令:

Debian/Ubutnu/Mint

# apt-get install linuxlogo   ### 注意名字略微不同

CentOS/RHEL/舊版 Fedora

# yum install linux_logo

Fedora Linux v22+ 或更新版本

# dnf install linux_logo

執行它

只需輸入下列命令:

$ linux_logo

執行 linux_logo

等等,還有更多!

你可以用這個命令檢視內建的標誌列表:

$ linux_logo -f -L list

輸出示例:

Available Built-in Logos:
    Num Type    Ascii   Name        Description
    1   Classic Yes aix     AIX Logo
    2   Banner  Yes bsd_banner  FreeBSD Logo
    3   Classic Yes bsd     FreeBSD Logo
    4   Classic Yes irix        Irix Logo
    5   Banner  Yes openbsd_banner  OpenBSD Logo
    6   Classic Yes openbsd     OpenBSD Logo
    7   Banner  Yes solaris     The Default Banner Logos
    8   Banner  Yes banner      The Default Banner Logo
    9   Banner  Yes banner-simp Simplified Banner Logo
    10  Classic Yes classic     The Default Classic Logo
    11  Classic Yes classic-nodots  The Classic Logo, No Periods
    12  Classic Yes classic-simp    Classic No Dots Or Letters
    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      Debian Swirl Logos
    17  Classic Yes debian_old  Debian Old Penguin Logos
    18  Classic Yes gnu_linux   Classic GNU/Linux
    19  Banner  Yes mandrake    Mandrakelinux(TM) Banner
    20  Banner  Yes mandrake_banner Mandrake(TM) Linux 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.

檢視 aix 的標誌,輸入:

$ linux_logo -f -L aix

檢視 openbsd 的標誌:

$ linux_logo -f -L openbsd

或者只是隨機看看一些 Linux 標誌:

$ linux_logo -f -L random_xy

可以像下面那樣結合 bash 的迴圈來顯示不同的標誌,輸入:

動圖1: linux_logo 和 bash 迴圈,既有趣又能發朋友圈耍酷

獲取幫助

輸入下列命令:

$ screefetch -h
$ linux_logo -h

參考


via: http://www.cyberciti.biz/hardware/howto-display-linux-logo-in-bash-terminal-using-screenfetch-linux_logo/

作者:Vivek Gite 譯者:alim0x 校對:wxy

本文由 LCTT 原創編譯,Linux中國 榮譽推出

相關文章