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:

kiran@foss-linux:~$ uname -o

-n or –nodename option displays the hostname.

Sample Output:

kiran@foss-linux:~$ uname -n

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

uname -r

Sample Output:

kiran@foss-linux:~$ uname -r

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

uname -v

Sample Output:

kiran@foss-linux:~$ 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:

kiran@foss-linux:~$ uname --machine

-p, –processor displays the processor type

Sample Output:

kiran@foss-linux:~$ uname -p

-i, –hardware-platform displays the hardware platform

kiran@foss-linux:~$ uname -i

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

uname -a

Sample Output:

kiran@foss-linux:~$ 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




manjaro complete usb drive
In this tutorial, we will show step by step how to install a Manjaro on a USB flash. For those new to this distro, it is a light-weight distro that is based on Arch Linux. Arch Linux is known for its simplistic approach and is typically made for Linux pros, but Manjaro bridges the gap between user-friendliness and rock-solid performance.
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.
gamemode enable linux
GameMode is a combination of various libraries and daemons that allows all the users to improve the gaming performance on the Linux system. Developed by games publisher Feral Interactive, it improves gaming performance by requesting a group of options that will be applied temporarily to the Linux system.