How to check hardware specification in Linux

You may at times need to know about the hardware information of you computer for many reasons, such as to find a correct driver or to check everything when you want to buy a used computer. In Windows, the only tool I know is Speccy but in Linux, I'm quite familiar to some different tools. In this article, I will introduce the tools that are used with the command line only, so you wont find any tool with a graphic interface here. Also, I assume that these tools are not preinstalled in your distro by default (since I'm using Arch Linux) so just skip the installation part if you already have these tools in your system.

1 - check the /proc/ folder

The /proc/ folder has many useful files to check hardware info. The most popular files are /proc/cpuinfo (about processor info), /proc/meminfo (about RAM memory) and /proc/partitions (a full list about all disk partitions). To check these files, you can go directly to the folder and open these files with the default text editor. You can also run the "cat" command to display these files on the terminal. For example, you can run the following command to display processor info on the terminal:

 cat /proc/cpuinfo  

2 - lshw

lshw is a small tool (just about 1MB) to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. Last time I checked, lshw is preinstalled in Ubuntu by default so you can skip the installation part (but I'm not so sure about that). To install lshw in Ubuntu and other Debian based distros, run this command:

 sudo apt-get install lshw  

If you use Arch Linux, run the following command to install it.

 sudo pacman -S lshw  

If you want lshw to give a full list of hardware info in details, just run this command (the list is quite long so it may take a little time to scan and display the info )

 sudo lshw  

If you just need a short list about hardware, you can use the following command

 sudo lshw -short  

The image below is the hardware info of my laptop after I run the short lshw command: how to find hardware info

To find the info of one specific class with lshw, say the processor, you can run the following command

 sudo lshw -class processor how to check hardware info

3 - hwinfo

Hwinfo is another useful tool to get hardware info. It is used to probe for the hardware present in the system and can be used to generate a system log. Hwinfo is my favorite tool so far – it gives more detaiks about the system hardware specification than lshw and the report is very well organized and easily accessible through command line switches.

To install hwinfo in Ubuntu and other Debian based distros, run this command:

 sudo apt-get install hwinfo  

If you use Arch Linux, use the following command:

 sudo pacman -S hwinfo  

The way you use hwinfo is quite analogous to that of lshw (however, you dont need to use the command as root for hwinfo). To get a complete report in details about all hardware components, serial number, model number, device class, descriptions, vendor, features ..., you can run this command:


If you just want the info about a particular class of hardware such as memory, processor or bios you can run a command like this:

 hwinfo --bios how to get hardware info

4 - dmidecode

Dmidecode is a very small tool (only 0.05MB) used for displaying table contents of a computer's DMI in an easy-to-read format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.

To install dmidecode in Ubuntu and other Debian based distros, run the following command:

 sudo apt-get install dmidecode  

To install dmidecode in Arch Linux, run the following command:

 sudo pacman -S dmidecode  

To use dmidecode, just like lshw, you need to run the command as root. To get a full report about hardware info, you can run the following command:

 sudo dmidecode  

To get details about particular hardware classes you can run the commands like the example below tools to find hardware info

No comments:

Post a Comment

Find Us On Facebook

Related Posts Plugin for WordPress, Blogger... Linux Directory