If you need to gather information about your Linux system, and you need to do so quickly, Jack Wallen has just the tool for you.
Sometimes gathering information about a machine can be troublesome, especially if you're dealing with a GUI-less server. But then, this is open source, so there is always a way. Naturally, when you need plenty of information on Linux, where do you turn? The command line.
I came across an incredibly handy tool called neofetch. This simple Command Line Interface (CLI) tool will, with a single command, gather plenty of information about your desktop or server. What information the tool displays will depend upon what distribution you are running, if you have a GUI, what hardware you have, and how you've configured neofetch.
Neofetch was written in bash and will fetch your system information and display it in easy to read ascii.
Let's install neofetch and see how it is used.
First off, you don't have to install neofetch to make use of the application. If you so choose, you can unpack the neofetch file into a USB drive and carry the tool around with you as a mobile Linux distribution information extractor. You can install neofetch from a repository, but I'm going to walk you through the process of installing the app from source. It's quite simple. I'll demonstrate on both a Ubuntu Server 16.04 without a GUI as well as Elementary OS Loki with a GUI.
To install neofetch from source, follow these steps:
- Open up a terminal window
- Download the tar file with the command wget https://github.com/dylanaraps/neofetch/archive/2....
- Unpack the file with the command tar xvfz 2.0.2.tar.gz
- Change into the newly created directory with the command cd neofetch-2.0.2
- Issue the command make
- Install the software with the command sudo make install
NOTE: If you get an error that 'make' cannot be found, issue the command sudo apt-get install make.
If you've installed neofetch, you can run the command neofetch to have the app display the system information. If you opted to not install, you can change into the neofetch-2.0.2 directory and issue the command ./neofetch to run the software.
When you issue the command, neofetch will display your system information in an easy-to-ready ascii format (Figure A).
Running neofetch on a machine with a GUI will give you even more information (Figure B).
Within the neofetch-2.0.2/config folder, you'll find a file called config. If you open that file you can enable/disable the various options. Out of the box you'll find the following options enabled:
- info "OS" distro
- info "Model" model
- info "Kernel" kernel
- info "Uptime" uptime
- info "Packages" packages
- info "Shell" shell
- info "Resolution" resolution
- info "DE" de
- info "WM" wm
- info "WM Theme" wm_theme
- info "Theme" theme
- info "Icons" icons
- info "Terminal" term
- info "Terminal Font" term_font
- info "CPU" cpu
- info "GPU" gpu
- info "Memory" memory
You can comment out any of the above by adding a # in front of the option you want to exclude. By default, neofetch disables the following:
- # info "CPU Usage" cpu_usage
- # info "Disk" disk
- # info "Battery" battery
- # info "Font" font
- # info "Song" song
- # info "Local IP" local_ip
- # info "Public IP" public_ip
- # info "Users" users
- # info "Birthday" birthday
Remove the # to enable any of the above options.
If you do change any of the above options, and you've installed neofetch, you'll need to re-install the software in the same manner as you did earlier. If you're opting to not install the software (and running it from within the neofetch-2.0.2 folder) and, after configuring neofetch, you find the information identical to what it displayed pre-config, it means neofetch has already deposited a configuration file in ~/.config/neofetch. If you find the config file in that directory, remove it and re-run neofetch.
A handy tool to have
There are times when you simply need to gather information and do not want to have to take the time to dig around. When that moment comes, you'll be glad you have this handy tool in your admin toolkit.
- How to install and configure LDAP and phpLDAPadmin (TechRepublic)
- How to connect multiple Google cloud accounts to Grive2 (TechRepublic)
- Fedora 25: Bleeding edge and bloody brilliant (TechRepublic)
- How to add more entropy to improve cryptographic randomness on Linux (TechRepublic)