Installing and Using the Neofetch Command | Linux Guide
Are you looking to display your system information in Linux but unsure how to go about it? The neofetch command, much like a personal assistant, simplifies this task for you. Neofetch is a command-line utility that shows system information in a visually appealing manner. It’s available on most package management systems, making installation straightforward once you understand the steps.
In this tutorial, we’ll guide you through installing and using the neofetch command on your Linux system. We’ll cover methods for both APT and YUM-based distributions, explain how to compile neofetch from source, install a specific version, and confirm that it’s installed correctly.
Let’s dive in and start installing neofetch on your Linux system!
TL;DR: How to Install and Use the neofetch Command in Linux
To install neofetch on Debian-based distributions like Ubuntu, run:
sudo apt-get install neofetch
For RPM-based distributions like CentOS, run:
sudo yum install neofetch
For Debian-based distributions like Ubuntu:
sudo apt-get install neofetch
For RPM-based distributions like CentOS:
sudo yum install neofetch
Output
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
neofetch
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/74.6 kB of archives.
After this operation, 381 kB of additional disk space will be used.
Selecting previously unselected package neofetch.
(Reading database … 160975 files and directories currently installed.)
Preparing to unpack …/neofetch_7.1.0-1_all.deb …
Unpacking neofetch (7.1.0-1) …
Setting up neofetch (7.1.0-1) …
Processing triggers for man-db (2.8.3-2ubuntu0.1) …
This is the basic way to install neofetch in Linux, but there’s much more to learn about installing and using neofetch. Continue reading for more details and advanced use cases.
Understanding and Installing Neofetch on Linux
Neofetch is a command-line tool that displays your system’s operating system, software, and hardware information in a visually appealing way. It’s like a digital business card for your system, showcasing your OS logo along with key system details. This tool is handy for system administrators or anyone needing to quickly access system information.
Let’s walk through how to install Neofetch on your Linux system. We’ll cover installation methods for both APT (for Debian-based distributions like Ubuntu) and YUM (for RPM-based distributions like CentOS).
Installing Neofetch with APT
If you’re using a Debian-based distribution like Ubuntu, you can install Neofetch using the APT package manager. Here’s how:
sudo apt update
sudo apt install neofetchOutput:
The following NEW packages will be installed:
neofetch
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 381 kB of additional disk space will be used.
The first command updates your package lists for upgrades or new installations, while the second installs Neofetch on your system.
Installing Neofetch with YUM
If you’re running an RPM-based distribution like CentOS, you can install Neofetch using the YUM package manager. Here’s the process:
sudo yum check-update
sudo yum install neofetchOutput:
Installed:
neofetch.noarch 0:7.1.0-1.el7
Complete!
The first command checks for system updates, and the second installs Neofetch.
Make sure you have administrative (sudo) privileges to install software on your Linux system. After installation, simply type neofetch into the terminal to display your system information.
Installing Neofetch from Source
Sometimes, installing software from the source is preferable, giving you more control over versions and configurations. Here’s how to install Neofetch from source:
git clone https://github.com/dylanaraps/neofetch.git
Output:
Cloning into ‘neofetch’…
remote: Enumerating objects: 269, done.
remote: Counting objects: 100% (269/269), done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 269 (delta 132), reused 187 (delta 80), pack-reused 0
Receiving objects: 100% (269/269), 2.75 MiB | 3.05 MiB/s, done.
Resolving deltas: 100% (132/132), done.
This command clones the Neofetch repository from GitHub to your local machine.
Installing Specific Versions of Neofetch
There may be cases where you need a specific version of Neofetch, perhaps due to compatibility issues or particular features. Here’s how to install specific versions using APT, YUM, and from source.
Using APT to Install Specific Versions
sudo apt install neofetch=7.0.0
Output:
The following packages will be DOWNGRADED:
neofetch
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 74.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
This installs Neofetch version 7.0.0 on your system.
Using YUM to Install Specific Versions
sudo yum downgrade neofetch-7.0.0
Output:
Resolving Dependencies
–> Running transaction check
—> Package neofetch.noarch 0:7.0.0-1.el7 will be a downgrade
—> Package neofetch.noarch 0:7.1.0-1.el7 will be erased
–> Finished Dependency Resolution
This command downgrades Neofetch to version 7.0.0.
Installing Specific Versions from Source
git clone https://github.com/dylanaraps/neofetch.git
cd neofetch
git checkout 7.0.0
Output:
Note: checking out ‘7.0.0’.
HEAD is now at 04f2c5b Bump version to 7.0.0
This checks out version 7.0.0 of Neofetch from the source.
Using Neofetch and Verifying Installation
After installing Neofetch, simply type neofetch into the terminal to display your system information.
neofetch
To verify the installation, use the which command:
Qwhich neofetch
Output:
/usr/bin/neofetch
This command returns the path where Neofetch is installed, confirming the installation.
Exploring Alternatives to Neofetch
While Neofetch is popular for displaying system information, there are alternatives like Screenfetch, which provides similar functionality but with fewer customization options.
Here’s how to install and use Screenfetch:
For Debian-based distributions like Ubuntu:
sudo apt-get install screenfetch
For RPM-based distributions like CentOS:
sudo yum install screenfetch
To display system information:
screenfetch
Manual System Information Display
Alternatively, you can manually check system information using built-in Linux commands. For instance, uname displays the OS and kernel version:
uname -a
Output:
Linux myhostname 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
While these methods are less visually appealing than Neofetch, they provide detailed insights into your system.
Here’s a brief comparison of these methods:
Method Advantages Disadvantages
Neofetch Visually appealing, customizable, easy Not always available in all repos
Screenfetch Simple, visually appealing, easy to install Less customizable than Neofetch
Manual No installation required, highly detailed More technical, not visually appealing
Troubleshooting Neofetch Issues
Sometimes, you might encounter problems with Neofetch, such as the command not being found or incorrect information being displayed. Let’s address common issues.
Neofetch Command Not Found
If you get a “command not found” error, it’s likely that Neofetch isn’t in your system’s PATH. Verify with:
which neofetch
If not in PATH, add it with:
export PATH=$PATH:/path/to/neofetch
Neofetch Displaying Incorrect Information
If Neofetch displays incorrect system info, update your system packages:
For Debian-based distributions like Ubuntu:
sudo apt-get update
sudo apt-get upgrade
For RPM-based distributions like CentOS:
sudo yum check-update
sudo yum update
Final Thoughts: Installing Neofetch for System Information Display
In this guide, we covered how to install Neofetch across different Linux distributions, how to install from source, and how to resolve common issues. Additionally, we explored alternatives like Screenfetch and manual commands. Neofetch stands out for its balance of visual appeal, customization, and ease of use, making it an excellent choice for displaying system information on Linux.