Display System Information in CLI with Neofetch


As a computer user, it's important to know specifications and operating system information of machine you're working with. This information can be helpful in troubleshooting issues or optimizing 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 same job. One such tool is Neofetch, a CLI system information tool that can display a variety of information about your system. In this article, we'll explore Neofetch and how it can be used to display system information in CLI.

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. information displayed by Neofetch includes −

  • Operating system information (e.g. distribution name and version)

  • Kernel version

  • CPU information (e.g. model name and clock speed)

  • GPU information (e.g. model name and driver version)

  • Memory usage

  • Disk usage

  • Network information (e.g. IP address and network interface name)

  • Shell information (e.g. shell name and version)

Installing Neofetch

Neofetch is available for many popular Linux distributions, including Ubuntu, Debian, Fedora, and Arch Linux. To install Neofetch on Ubuntu, for example, you can use following command −

sudo apt-get install neofetch

On Fedora, you can use following command −

sudo dnf install neofetch

Once Neofetch is installed, you can use it to display system information in CLI.

Using Neofetch

Using Neofetch is straightforward. Simply open a terminal and type following command −

neofetch

This will display system information in CLI. output of Neofetch is color-coded and includes ASCII art that represents 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-1065G

As you can see, output of Neofetch is very detailed and provides information about OS, kernel, hardware, and other components of system. Neofetch also displays user name and host name, 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 information you need or to change appearance of output. Neofetch provides a number of customization options that you can use to modify its behavior. Here are some of customization options that are available −

  • --off − Turns off all display options except logo and information bar.

  • --color_blocks − Displays system information in color blocks rather than text.

  • --bold − Makes system information text bold.

  • --ascii_distro − Forces Neofetch to use ASCII art logo for specified distribution.

  • --backend − Specifies backend that Neofetch should use to get system information (e.g. sysinfo, test, uname).

  • --config − Specifies a configuration file to use for Neofetch.

To use these customization options, simply add them to neofetch command. For example, to turn off all display options except logo and information bar, you can use following command −

neofetch --off

This will display only logo and information bar, as shown below −

                   user@ubuntu
             -----------------------
           OS: Ubuntu 20.04.3 LTS x86_64 
        Host: HP Pavilion Laptop 15-cs3xxx 
       Kernel: 5.11.0-27-generic 
     Packages: 2177 (dpkg), 5 (snap) 
      Shell: bash 5.0.17 
     Session: gnome-wayland 

To display system information in color blocks, you can use --color_blocks option −

neofetch --color_blocks

This will display system information in color blocks, as shown below −

                    ██████████████████   user@ubuntu
               ████████████████████████  --------------
            ████████████████████████████ OS: Ubuntu 20.04.3 LTS x86_64 
           █████████████████████████████ Host: HP Pavilion Laptop 15-cs3xxx 
          ██████████████████████████████ Kernel: 5.11.0-27-generic 
         ███████████████████████████████ Uptime: 1 day, 3 hours, 30 mins 
        ████████████████████████████████ Packages: 2177 (dpkg), 5 (snap) 
       █████████████████████████████████ Shell: bash 5.0.17 
      ██████████████████████████████████ Resolution: 1920x1080 
     ███████████████████████████████████ DE: GNOME 3.36.8 
    ████████████████████████████████████ WM: Mutter 
   █████████████████████████████████████ WM Theme: Adwaita 
  ██████████████████████████████████████ Theme: Yaru-dark [GTK2/3] 
 ███████████████████████████████████████ Icons: Yaru [GTK2/3] 
████████████████████████████████████████ Terminal: gnome-terminal 

Conclusion

Neofetch is a useful command-line tool for displaying system information in CLI. It provides a lot of detailed information about operating system, hardware, and other components of system, and it can be customized to display only information you need or to change appearance of output. Neofetch is a great tool for system administrators, developers, and anyone who wants to know more about their system without having to navigate through multiple menus and options.

In this article, we've covered how to install and use Neofetch, as well as some of its customization options. We've also provided examples of how Neofetch can be used to display system information in different formats.

If you're new to CLI or just want to explore different tools for working with command line, Neofetch is a great place to start. It's easy to use, informative, and customizable, making it a valuable addition to any CLI workflow.

So, go ahead and give Neofetch a try! You might be surprised at how much you can learn about your system just by running a simple command.

Updated on: 04-Apr-2023

292 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements