シェルの情報とディストリビューションのロゴを表示させるコマンド『screenfo』

今回記述するのは、『screenfo』コマンド。Perlで作られており、以前に紹介した『screenFetch』『ARCHEY』『linuxlogo』と同じように、システム情報とディストリビューションのロゴをターミナル上に表示させるコマンドだ。対応しているOSはLinuxの他、BSDやWindowsのロゴも出力できる。

1.インストール

まずはインストールから。以下のコマンドを実行する。

bash
sudo cpan Term::ExtendedColor git clone git://github.com/trapd00r/screenfo cd screenfo perl Makefile.PL make sudo make install cp screenfo.conf $HOME/.screenfo.conf cp ./screenfo ../.screenfo

2.コマンドの実行

インストールができたら、実際にコマンドを実行してみよう。
まずはヘルプの情報から出力させる。

shell
$ screenfo -h Usage: screenfo [OPTION]... Options: -c, --color specify colorscheme to use -l, --list list available colorschemes -a, --ascii specify ascii art to use -r, --random randomize the colors -s --shot take screenshot -d, --debug run some tests and exit -h, --help show help and exit -m, --man show the manpage and exit -v, --version show version info and exit

それでは、実際にコマンドを実行してみよう。
まずは引数無しで実行。

bash
screenfo

…うーん、Archのロゴが表示されている。
どうやら、CentOSは対象に入っていないらしい。

では、どのディストリビューションであればロゴの対象なんだろうか?
確認するには、ダウンロードした「screenfo」フォルダの中にある「ascii」フォルダを参照すると良い。

shell
$ ls -la 合計 56 drwxr-xr-x 2 root root 4096 9月 28 13:57 2014 . drwxr-xr-x 5 root root 4096 9月 28 14:42 2014 .. -rw-r--r-- 1 root root 569 9月 28 13:57 2014 arch -rw-r--r-- 1 root root 636 9月 28 13:57 2014 arch-new -rw-r--r-- 1 root root 476 9月 28 13:57 2014 arch-old -rw-r--r-- 1 root root 503 9月 28 13:57 2014 bsd -rw-r--r-- 1 root root 387 9月 28 13:57 2014 debian -rw-r--r-- 1 root root 553 9月 28 13:57 2014 fedora -rw-r--r-- 1 root root 564 9月 28 13:57 2014 gentoo -rw-r--r-- 1 root root 213 9月 28 13:57 2014 pedobear -rw-r--r-- 1 root root 498 9月 28 13:57 2014 sabayon -rw-r--r-- 1 root root 385 9月 28 13:57 2014 tux -rw-r--r-- 1 root root 553 9月 28 13:57 2014 windows -rw-r--r-- 1 root root 1041 9月 28 13:57 2014 windows-8

ふむふむ、この辺が対応しているのね。
実際に、いくつかのロゴを指定してみる。ロゴを指定するには、「-a」オプションのあとにそのロゴ名を記述する。

BSD

bash
screenfo -a bsd

Fedora

bash
screenfo -a fedora

Debian

Windows

その他、「-c」オプションでカラーリングも変更できる。
「motd」に設定したら面白そうだ。