Neofetch is an effective, yet easy-to-use utility that allows you to display system information in the terminal. Its peculiarity is that it displays information next to a beautiful image. As an image you can use the distribution logo or any other image you wish.
Functionally, the program is similar to ScreenFetch or LinuxLogo, but it benefits from customizability and flexibility, plus it contains useful additional features. It is fast, can output an image in ASCII format, and can take screenshots after the script is finished.
Before reviewing the program, let's take a look at the main dependencies:
Bash 3.0+ and 33 [14t support must be configured, this is provided by most terminals, otherwise these dependencies are needed for additional functions.
Information about linux system when starting the terminal is nice, but it is at least and at most, sometimes this information is especially useful. You can install the program from third-party repositories in any Linux distribution. Now let's look at the instructions for the most popular ones.
The following command should be executed:
$ echo "deb http://dl.bintray.com/dawidd6/neofetch jessie main" | sudo tee -a /etc/apt/sources.list
$ curl -L "https://bintray.com/user/downloadSubjectPublicKey?username=bintray" -o Release-neofetch.key && sudo apt-key add Release-neofetch.key && rm Release-neofetch.key
$ sudo apt-get update
$ sudo apt-get install neofetch
In these distributions, you should execute:
$ sudo add-apt-repository ppa:dawidd0811/neofetch
$ sudo apt-get update
$ sudo apt-get install neofetch
First of all install the dnf-plugins-core plugins package:
$ sudo yum install dnf-plugins-core
Then add a repository and install neofetch from there:
$ sudo dnf copr enable konimex/neofetch
$ sudo dnf install neofetch
Versions of neofetch or neofetch-git are installed from the AUR repository using packer or yaourt:
$ packer -S neofetch
$ packer -S neofetch-git
Or:
$ yaourt -S neofetch
$ yaourt -S neofetch-git
Here we use the command:
$ sudo emerge app-misc/neofetch
To display the information in the terminal, use the command:
$ neofetch
Keep in mind, if w3m-img or imagemagick is not installed on the system, screenfetch will be used by default and neofetch will display the linux logo as ASCI.
If you wish to display the linux distribution logo as a plain image, you should install w3m-img or imagemagick on your system.
The command for Ubuntu:
$ sudo apt-get install w3m-img
Command for Red Hat / Fedora:
$ sudo yum install w3m-img
Now let's run the utility again to see the desktop wallpaper image as an image:
$ neofetch
After the first run, the program will create a configuration file with certain settings at ~/.config/neofetch/config
. The file has a printinfo() function that allows the user to customize the system information to be output. If necessary, the user has the ability to remove unnecessary lines, add new lines, or modify them.
To open the configuration file execute:
$ vi ~/.config/neofetch/config
The contents of the file are approximately as follows:
#!/usr/bin/env bash
# vim:fdm=marker
#
# Neofetch config file
# https://github.com/dylanaraps/neofetch
# Speed up script by not using unicode
export LC_ALL=C
export LANG=C
# Info Options {{{
# Info
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
printinfo() {
info title
info underline
info "Model" model
info "OS" distro
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "WM" wm
info "WM Theme" wmtheme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" termfont
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
# info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# info "Local IP" localip
# info "Public IP" publicip
# info "Users" users
# info "Birthday" birthday
info linebreak
info cols
info linebreak
}
Run the command to find out all the utility options and configuration options:
$ neofetch --help
To verify that the settings in the configuration file are correct, use the command:
$ neofetch --test
The --ascii flag can be used to command that the distribution logo be drawn in text format:
$neofetch --ascii
The program can be run with each terminal startup, add running ~/.bashrc
at the end:
$ vi ~/.bashrc
...
neofetch
In this overview article, the features of a program capable of outputting linux system information and the distribution logo to the terminal were discussed.