Lgo.png

 Going Linux

   for computer users who just want to use Linux to get things done


Display Your Linux System Information

Updated: 01-Dec-2016

Display Your Linux System Information

When you move to a new operating system (whether it's Windows, OS-X or a Linux OS that's new to you) it's often difficult to find what you are looking for -- at first. Take finding a list of your system hardware for example. As of the last time I used Windows, if you want a graphical display of the specs for your computer, you right-click on the My Computer icon and select Properties. I imagine that's not very intuitive if you have only ever used a Mac. On Apple's OS-X, you select About This Mac from the Apple menu to get a dialog box with selections to display at least some of your computer's specifications. Linux, too, has graphical tools to display information about your computer's hardware. Ubuntu MATE, for example, provides system specifications in the Welcome application. From the menus, select System > Welcome > Getting Started > System Specifications. For other distributions, there is a utility called SysInfo that does a similar thing. SysInfo is not installed by default in all distributions, but it is available in many package repositories. Just use your package manager to install it.

Ubuntu MATE's System Information

These graphical methods present a nice browsable list of information, but with a terminal and a few commands, you can really dig under the hood of your Linux computer's hardware. The remainder of this discussion describes how to use the command line to reveal some information stored in text files on your hard drive and, for the big finish, how to get all of your system information--all at once--by typing a single line of text into the terminal!

Under the hood, Linux is Linux. The various distributions of Linux have different applications and utilities packaged with the OS by default, different package managers, different window managers/desktop environments, different artwork, etc. Some actually implement the system structure in different ways (like installing applications in one system directory vs. another) but when it comes right down to it, they are pretty much all the same. The user experience can be very different with each distribution, however, because of the different "packaging." And that can be confusing to a new user. But underneath the outer layer is still the Linux kernel. The command line is where it all comes together, and that is where you can get your system specs most completely.

Display your system info using "inxi"

Possibly the easiest command to use in the terminal to get a full listing of your computer's configuration is inxi -F as shown below. If inxi is not provided in your distribution by default, you will need to install it before you can use it. For a more verbose set of information, use inxi -Frmxx. For just the very basic info, type simply inxi.

Output of the command inxi -F

Display your system info using "cat"

Here are some additional ideas for displaying some of the statistics for your computer's hardware and software using the command line. The list below contains some commands you can type into the terminal (or copy and paste if you prefer) that show some of the system information that is stored in text files on your system. You may not be that familiar with the command line, so let's start with a description of what these commands do:

cat: takes the text contents of a file or files and displays it in the terminal window<
grep: searches for a specific passage of text within a larger body of text
| (the vertical bar): tells the command line to take the output of the command to the left of the bar, and use it as input for the command to the right of the bar.

Useful commands:

Note that these should work regardless of your Linux distribution or window manager.

CPU info:
cat /proc/cpuinfo
cat /proc/cpuinfo | grep 'model name'

Memory info:
cat /proc/meminfo
cat /proc/meminfo | grep MemTotal
cat /proc/meminfo | grep MemFree

Storage info:
cat /proc/partitions

You'll find more commands like this in these two references:
Linux Commands Cheat Sheet
Ubuntu Cheat Sheet

The "list hardware" command

Now... we've saved the best one for last. The command, lshw, is the "list hardware" command. You can type it at the command line without any switches or options, but the text file it generates runs on forever, and is a little difficult to follow in the terminal. It needs to run as root, hence the "sudo" in front of it. The command listed below runs lshw with the -html option to create an html file--usually in your home directory. Open it in a browser and you have a nice "web page" with all of your hardware specs.
sudo lshw -html>myhardware.html

When I ran it, this command even detected and reported on the micro-SD card on my phone I had charging on a USB port!

Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. https://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.