- How to Display System Details and Hardware Information on Linux
- Method 1: CPU-X
- Method 2: Hardware Lister (lshw)
- Method 3: Neofetch
- Method 4: inxi
- Method #5: ls* Commands
- Summary
- About the author
- David Morelo
- Get Linux System and Hardware Details on the Command Line
- Displaying Basic System Information on Linux Shell
- The uname Command
- Get the Linux Kernel Name
- Get the Linux Kernel Release
- Get the Linux Kernel Version
- Get Network Node Hostname
- Get Machine Hardware Architecture (i386, x86_64, sysinfo Linux)
- Get Processor Type
- Get Hardware Platform
- Get Operating System information
- Displaying All Information of Uname Command
- Displaying Detailed Hardware Information
- Get Hardware Information with lshw
- Short Summary
- Creating an HTML File
- Get CPU Information with lscpu
- Get Block Device Information with lsblk
- Get USB Device Information with lsusb
- Get Information About Other Devices
- Search
- About This Site
- Latest Tutorials
How to Display System Details and Hardware Information on Linux
A master craftsman is deeply familiar with the tools he or she works with, and you need to be familiar with your Linux system and the hardware it runs on if you want to call yourself an advanced user.
Knowing how to display system details and hardware information on Linux is guaranteed to come in handy when troubleshooting all kinds of problems, from hardware devices not showing up to software applications not installing or running correctly.
As is usually the case, Linux gives you multiple ways to display system details and hardware information, some requiring more technical knowledge than others.
Method 1: CPU-X
If you’re familiar with CPU-Z, a freeware system profiling and monitoring application for Microsoft Windows, then you’ll love CPU-X, its free and open-source alternative.
CPU-X runs on Linux and FreeBSD, and it has a graphical user interface designed after the application that inspired it. There’s also a text-based user interface created using the ncurses library, plus a special dump mode that’s useful for outputting all collected information into a text file.
You can download CPU-X from the official repositories of most major Linux distributions, including Ubuntu, Fedora, and Solos, or you can build it yourself following the step-by-step guide on the Wiki.
Method 2: Hardware Lister (lshw)
Hardware Lister is a tool for gathering detailed hardware information. The tool comes with an optional graphical user interface that displays the gathered information in a more user-friendly manner, but most users rely only on the lshw command.
If you’re using a major Linux distribution like Ubuntu, the lshw command (but not the GUI, called lshw-gui) will likely already be installed on your system. To use it, all you need to do is enter the following command in the terminal:
Hardware Lister will then display a long list of information about your Linux machine, including its name, CPU, connected USB devices, memory, and more.
Method 3: Neofetch
This command-line system information tool written in bash is loved by aesthetically-oriented Linux users for its ability to display basic OS, software, and hardware information in a visually pleasing manner. To use Neofetch with its default settings, simply install the tool and invoke it in your favorite terminal emulator:
By default, Neofetch will display your operating system’s logo on the left (more than 150 operating systems are supported) and system information on the right. You can also configure Neofetch to use an image, a custom ASCII file, the current wallpaper, or nothing at all.
Method 4: inxi
inxi (never capitalized) is a command line system information tool that started as infobash, developed by locsmif.
“That was a buggy, impossible to update or maintain piece of software, so the fork fixed those core issues, and made it flexible enough to expand the utility of the original ideas,” explains the project’s GitHub page.
So, what can inxi tell you about your system and the hardware it runs on? Just about anything you could possibly need for basic troubleshooting and more.
To tell inxi to display full output with extra details, use the following command:
If you want to share the collected information with strangers on the internet, you can also include the -z flag, which masks out personally identifying information like your MAC and IP address.
Method #5: ls* Commands
To display system details and hardware information on Linux, you actually don’t need to download any third-party software. Instead, you can take advantage of the so-called ls* commands to display information gathered from places like /proc.
Here are the ls* commands you should know about:
- lscpu: used to display information about the CPU.
- lsusb: used to display information about USB buses in the system and the devices connected to them.
- lspci: used to display information about PCI buses and devices in the system.
- lssci: used to display information about scsi/sata devices.
Each of these commands supports a variety of flags, so we recommend you study their man pages to for more information about them.
Summary
In this article, we’ve described five ways to display system details and hardware information on Linux to help you quickly collect the information you need to troubleshoot any problem. Now, it’s up to you to pick the method you like the most and put it to good use.
About the author
David Morelo
David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application
Get Linux System and Hardware Details on the Command Line
If you are using Linux, you may need to know details about the system or the hardware specifications you are using. As a regular Linux user or software developer, it is important that you check the compatibility of any software or hardware system that you want to install. The Linux command line contains several built-in commands that help you become familiar with the software and hardware platform you are working on. This tutorial will teach you how to use these commands to get the sysinfo Linux details.
The commands and examples to get hardware specs from Linux in this tutorial have been tested on Ubuntu 22.04 and Debian 11.
Displaying Basic System Information on Linux Shell
To know the basic information about your system, you need to be familiar with the command-line utility called uname-short for unix name.
The uname Command
The uname command comes with multiple switches. The basic command as described below only returns the Kernel name:
As you can see, the uname command when used without any switches only returns the kernel name i.e., Linux for my system.
Get the Linux Kernel Name
When you precisely want the command to print the kernel name, you will use the following command:
The above output has displayed Linux as my kernel name.
Get the Linux Kernel Release
In order to print the release information of your kernel, use the following command:
The above command has displayed the release number of my Linux
Get the Linux Kernel Version
To fetch the version of your kernel, use the following command:
The above output shows the version number of my kernel.
Get Network Node Hostname
You can use the following command to print the network hostname of your node:
You can also use the following command for the same purpose as it is more user-friendly:
Both commands will display the same output. Please note that the host and node names might not be the same for non-Linux systems.
Get Machine Hardware Architecture (i386, x86_64, sysinfo Linux)
In order to know the hardware architecture of the system you are working on, please use the following command:
The output x86_64 signifies that I am using a 64-bit architecture. The output i686 means that a user is on a 32-bit system.
Get Processor Type
To know the type of processor you are using, please use the following command:
This output shows that I am using a 64-bit processor.
Get Hardware Platform
To know the hardware platform you are using, please use the following command:
In my case, the output is the same as that of the machine hardware name.
Get Operating System information
The following command will let you know the name of the operating system you are using:
My Ubuntu machine has displayed the above output for my system.
Displaying All Information of Uname Command
The above commands have displayed system information as per the type of switch used. In case you want to see all the system information at once, use the following command:
You can see that the above output shows the complete list of system information for the user.
Displaying Detailed Hardware Information
Here we will describe the commands, other than uname, that are used to extract detailed hardware information of your system:
Get Hardware Information with lshw
The lshw utility lets you fetch important hardware information, such as memory, CPU, disks, etc., from your system. Please run the following command as a super user to view this information:
The above output is a very detailed version of the hardware information of my system. You can also view a summary to list only specific hardware components of hardware information as described in the following section.
Short Summary
In order to view the summary of your detailed hardware profile, please use the following command:
The above output is a column-wise summary of the hardware profile which is more readable.
Creating an HTML File
The lshw utility also lets you print detailed information of your hardware profile and hardware components to an HTML file as a superuser. Use the following command for this purpose:
$ sudo lshw -html > [filename.html]
$ sudo lshw -html > hardwareinfo.html
The above HTML file has been created at the /home/user/ folder.
Get CPU Information with lscpu
The lscpu utility lists detailed CPU information like cpu and processing units from the files sysfs and /proc/cpuinfo to your screen. This is how you can use this command:
The above output displays CPU architecture, number of CPUs, cores, CPU family model, threads, CPU caches and much more.
Get Block Device Information with lsblk
The lsblk utility displays information about all the basic storage devices of your system such as hard drive, its partitions and the flash drives connected to your system.
You can use the following command to view much more detailed information about all the devices:
Get USB Device Information with lsusb
The lsusb command lists information about all the USB controllers and the devices connected to them. Please run the following command:
You can also use the following command to view much detailed information about each USB device.
This output displays all the USB controllers and the attached devices.
Get Information About Other Devices
You can also view information about the following devices of your system:
$ hdparm [devicelocation] e.g. $ hdparm /dev/sda2
After practicing along with this tutorial, you will never fail to retrieve sysinfo about Linux and the underlying hardware of your system. This will help you check the system specifications and whether or not prospective hardware or software is compatible with your system.
Search
About This Site
Vitux.com aims to become a Linux compendium with lots of unique and up to date tutorials.