How to find your Linux System and Hardware Details by Command-line

In this guide, we will dig deep into the commands used to fish out these system details including the software and hardware info using uname command-line tool.

Getting hardware and your Linux system software details are one of the important steps in Linux administration. In this article, we will dig deep into the commands used to fish out these system details using uname command-line tool. Additionally, we will use the lshw command to get more detailed information about hardware.

Since the commands are native to Linux, these should work on any Linux distro Terminal. Note that all the below commands are to be entered in the Linux Terminal.

Finding Software & Hardware Details

To begin with, let’s first find out the software details including Linux Kernel, Distro, and other such details. The command used to find the system information is uname. The general syntax is as follows:

1. uname command

Usage: uname [option]

We shall discuss all the options and of the uname command with sample output from our test PC. uname  –help command in your Terminal provides all the details of how the command can be used.

uname usage
uname usage

Operating System, Hostname, and Linux Kernel

-o or –operating-system option displays the Operating System.

uname -o

Sample Output:

[email protected]:~$ uname -o

-n or –nodename option displays the hostname.

Sample Output:

[email protected]:~$ uname -n

For finding the Linux Kernel release, use -r or –kernel-release option.

uname -r

Sample Output:

[email protected]:~$ uname -r

-v or –kernel-version option prints the kernel version.

uname -v

Sample Output:

[email protected]:~$ uname -v
#201903032031 SMP Mon Mar 4 01:33:18 UTC 2019

Processor, Machine Type, Hardware Platform

Moving to the hardware details, we still use the uname command with options as follows:

-m, –machine displays the machine hardware name

Sample Output:

[email protected]:~$ uname --machine

-p, –processor displays the processor type

Sample Output:

[email protected]:~$ uname -p

-i, –hardware-platform displays the hardware platform

[email protected]:~$ uname -i

If you want all the above information in a single command, use -a or –all option as follows.

uname -a

Sample Output:

[email protected]:~$ uname -a
Linux foss-linux 5.0.0-050000-generic #201903032031 SMP Mon Mar 4 01:33:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Display System Software Details
Display System Software Details

Finally, in order to know the uname utility version, use –version.

uname utility version details
uname utility version details

2. lshw command

List Hardware (lshw) command is another popular command used by the system administrators to get very detailed information of the hardware specs of the machine. It does so by reading different files in the /proc directory in the Linux machine.

The lshw utility needs root access to get the information. It can report RAM configuration, Firmware version, Motherboard configuration, CPU info, cache configuration, bus speed, etc. It comes installed by default in most of the Linux distros. If the below commands don’t work, your Linux distro does have it installed. Head over to the official Github page to install the utility.

The command syntax is lshw [-format] [-options …]

The format can be any one of the following:

html output hardware tree as HTML
-xml output hardware tree as XML
-json output hardware tree as a JSON object
-short output hardware paths
-businfo output bus information

Options can be any one of the following: 

-class CLASS only show a certain class of hardware
-C CLASS same as ‘-class CLASS’
-c CLASS same as ‘-class CLASS’
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don’t display the status
-sanitize  remove sensitive information like serial numbers, etc.
-numeric output numeric IDs (for PCI, USB, etc.)
-notime exclude volatile attributes (timestamps) from output

Since it needs to run as root, use sudo before the command:

Example: sudo lshw will list all the details of the machine.

lshw command usage
lshw command usage

The best part of the lshw command is how it can export the output to html format so that you can easily share with others or save it for the record.

Usage: sudo lshw -html > [filename.html]

Example: sudo lshw -html > hardware_details.html

The html file should get saved in the Home directory.

lshw exported harware details in html format
lshw exported hardware details in HTML format


Hope you enjoyed reading this tutorial to find your Linux machine’s software and hardware details. Uname is a simple tool that doesn’t need root access and can get basic details. For complete details, deep diggers can use the powerful lshw command with root privileges.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!


Please enter your comment!
Please enter your name here




Create a ClamAV Antivirus Live USB drive, and how to use it

Antivirus Live CD or USB drives come in handy at times when your computer is infected with a virus and other malware. Here is how you can create a ClamAV Live USB drive to scan and remove the malware from a computer.


best music players for linux
For sure, there will be Linux users out there who cannot live without music. If you're one of those people, you would know how important it is to have a good music player installed on your computer system. In this article, we present to you the 5 Best Music Players for Linux, which will hopefully be able to satisfy each of our readers' needs.
In this article, we will take a look at 10 of the best PDF editors and tools out there in 2019 that are available for Linux platforms. The editors are going to be judged on the basis of their functionalities, portability, ease of installation, price, and convenience.
terminate frozen app
For dealing with a frozen app or desktop, you can't use the CTRL+ALT+DEL in Linux system. Instead, there are powerful alternatives that come in handy in frustrating situations. We pick the best methods available for you.
Application Launchers for Ubuntu
Ubuntu is one of the most used Linux distributions worldwide. It is also the reason why it has the maximum number of available programs for itself. Today we are going to talk about one category of those programs, the application launchers.
best linux distros programmers
Linux distros have long been a favorite among programmers since the rise in popularity of the OS in the nineties. Programmers are technical by nature, and Linux distros appeal to that technical nature. Let's discuss why Linux is a great desktop OS for programmers and developers, and find out best distros suitable for them.