Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Display System Information in CLI with Neofetch
As a computer user, it's important to know the specifications and operating system information of the machine you're working with. This information can be helpful in troubleshooting issues or optimizing your system for better performance. While there are many graphical user interface (GUI) tools that can display this information, there are also command-line interface (CLI) tools that can do the same job. One such tool is Neofetch, a CLI system information tool that can display a variety of information about your system in an attractive, easy-to-read format.
What is Neofetch?
Neofetch is a command-line system information tool written in Bash. It displays information about your system in a visually appealing and easily understandable way with colorful ASCII art. The information displayed by Neofetch includes
Operating system information (distribution name and version)
Kernel version
CPU information (model name and clock speed)
GPU information (model name and driver version)
Memory usage
Disk usage
Network information (IP address and network interface name)
Shell information (shell name and version)
Desktop environment and window manager
System uptime and package count
Installing Neofetch
Neofetch is available for many popular Linux distributions, including Ubuntu, Debian, Fedora, and Arch Linux. Here are the installation commands for common distributions
Ubuntu/Debian
sudo apt-get install neofetch
Fedora
sudo dnf install neofetch
Arch Linux
sudo pacman -S neofetch
macOS (using Homebrew)
brew install neofetch
Using Neofetch
Using Neofetch is straightforward. Simply open a terminal and type the following command
neofetch
This will display system information in the CLI. The output of Neofetch is color-coded and includes ASCII art that represents your distribution logo or system architecture. Here's an example output of Neofetch on an Ubuntu system
.-/+oossssoo+/-. user@ubuntu
`:+ssssssssssssssssss+:` --------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.3 LTS x86_64
`:ossssssssssssssssssdMMMNysssso:` Host: HP Pavilion Laptop 15-cs3xxx
/ossssssssssssssssssdMMMNyssssooo. Kernel: 5.11.0-27-generic
ossssssssssssssssssdMMMNyssssooooso. Uptime: 1 day, 3 hours, 30 mins
ossssssssssssssssssdMMMNyssssoooossssoo/` Packages: 2177 (dpkg), 5 (snap)
ossssssssssssssssssdMMMNyssssoooosssssooo+ Shell: bash 5.0.17
ossssssssssssssssssdMMMNyssssoooossssssoooo/ Resolution: 1920x1080
ossssssssssssssssssdMMMNyssssoooossssssoooo+ DE: GNOME 3.36.8
`+sssssssssssssssssdMMMNyssssoooossssoo+/ Session: gnome-wayland
-+sssssssssssssssssyyyssss+- CPU: Intel i7-1065G7
As you can see, the output of Neofetch is very detailed and provides comprehensive information about the OS, kernel, hardware, and other system components. Neofetch also displays the username and hostname, which can be useful in a multi-user environment.
Customizing Neofetch
While Neofetch provides a lot of useful information by default, you may want to customize it to display only the information you need or to change the appearance of the output. Neofetch provides numerous customization options
| Option | Description |
|---|---|
--off |
Turns off all display options except logo and information bar |
--color_blocks |
Displays system information with color blocks |
--bold |
Makes system information text bold |
--ascii_distro |
Forces Neofetch to use ASCII art logo for specified distribution |
--backend |
Specifies backend for getting system information |
--config |
Specifies a configuration file to use |
Examples
To display minimal output with only the logo and information bar
neofetch --off
To display system information with color blocks instead of ASCII art
neofetch --color_blocks
To force a specific distribution's ASCII art
neofetch --ascii_distro ubuntu
Configuration File
Neofetch uses a configuration file located at ~/.config/neofetch/config.conf. You can edit this file to permanently customize which information is displayed, change colors, modify the ASCII art, and adjust formatting options. The configuration file is well-commented and allows for extensive customization.
Common Use Cases
System Administration Quickly check system specifications across multiple servers
Troubleshooting Gather system information for bug reports or support requests
Screenshots Display system information in terminal screenshots for forums or documentation
System Monitoring Include in login scripts to show system status
Conclusion
Neofetch is an excellent command-line tool for displaying comprehensive system information in an attractive, easy-to-read format. It provides detailed information about your operating system, hardware, and system configuration with beautiful ASCII art and color coding. With its extensive customization options and cross-platform support, Neofetch is a valuable tool for system administrators, developers, and anyone who wants quick access to their system specifications from the command line.
