Neofetch is a free, open-source command-line system information tool written in bash 3.2+. Neofetch displays system information in a beautiful aesthetic way, such as system model and manufacturer, operating system, kernel version, uptime, memory resources, disk usage, and more. All this is displayed in an easy-to-read format that can be further customized with colors and logos. Neofetch also outputs the information in JSON, so other programs and scripts can use it. Neofetch is an excellent tool for anyone who wants quick and easy system information without installing additional software.
In the following tutorial, you will learn how to install Neofetch on Rocky Linux 9 using the command line terminal and how to use the terminal commands to achieve more with Neofetch.
Table of Contents
Update Rocky Linux
First, update your system to ensure all existing packages are up to date to avoid conflicts.
sudo dnf upgrade --refresh
Import EPEL Repository
The first task is to install the (EPEL) repository, which stands for (Extra Packages for Enterprise Linux). For newer users of Rocky Linux and similar distributions based on RHEL, EPEL contains the most commonly used software packages for Enterprise Linux.
First, enable the CRB.
sudo dnf config-manager --set-enabled crb
Next, install EPEL using the following (dnf) terminal command.
sudo dnf install \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
With the EPEL repository now imported, you can install Neofetch using the following command.
sudo dnf install neofetch -y
Once installed, verify the installation and build using the neofetch –version command.
[joshua@rocky-linux-9 ~]$ neofetch --version Neofetch 7.1.0
How to use Neofetch Commands
How to use Neofetch is straightforward for the most part. The most typical command to use Neofetch is to do a printout of your system specs. In your terminal, use the following command.
As above, the default information that is printed is as follows.
|OS:||Operating System Name and Version.|
|Host:||PC or Server Name.|
|Kernel:||The Linux Kernel version and build.|
|Uptime:||The system uptime since start/reboot.|
|Packages:||Installed Package Managers with package count.|
|Shell:||Installed shell version.|
|DE:||The installed user interface (Desktop Environment).|
|WM:||Type of Window manager in use.|
|WM Theme:||The Windows Manager theme.|
|Theme:||The installed user interface theme.|
|Icons:||The installed Icon Pack.|
|Terminal:||The default terminal is in use.|
|CPU:||The processor and performance|
|GPU:||The installed graphics card.|
|Memory:||Memory amount used and available.|
However, neofetch is more capable of giving customized options. The good idea is to use the neofetch –help command.
The neofetch command uses the –option and “value” syntax.
neofetch func_name --option "value" --option "value"
For example, if you want to print out your system uptime, use the following command.
neofetch uptime --uptime_shorthand tiny
Another example is checking memory and uptime, and you can specify multiples.
neofetch uptime disk wm memory
How to Remove (Uninstall) Neofetch
Users that no longer wish to have Neofetch installed on their system use the following command.
sudo dnf autoremove neofetch -y
The removal command will also uninstall any unused dependencies on your system.
I would advise keeping the EPEL repository installed, many packages for RHEL clones are imported directly from it, and no doubt it will be helpful in the future.
Comments and Conclusion
Neofetch is a handy tool that can be used to display system information beautifully and concisely. This makes it perfect for displaying on your terminal or sharing with others. The neofetch project is open source, so you are free to contribute and make changes as you see fit.