Get Hardware Info

How To Find Out Hardware Information In A Linux System
(Easy to find CPU/memory module part/serial number etc,.)

--"-- hwlist command --"--

***Simple|Easy to install|User-friendly|runs on RHEL7.x as well****

This command (hwlist) has been tested to run successfully on Linux variants such as RHEL 7/6, SLES 12/11, Mint16, Ubuntu 16/14, BOSS 6(Debian) etc. running on 64/32 bit architectures. It may work on other variants as well, however, not tested. These tests were run on virtual machines. This is a small, simple command which makes use of native Linux utilities to get the required details. Now, it is easy to find CPU/RAM module manufacturer, serial number, part number etc., Also, this could help in finding server serial number, manufacturer and other details as explained.

All you need to do is install 'hwlist-2.0-1.noarch.rpm' package on your system and then run the 'hwlist' command.


Package Name: hwlist-2.0-1.noarch.rpm
Build To Run On: RHEL 7/6, SLES 11/12,  CentOS, OEL, Ubuntu 16/14, and other Debian based systems x86 & x86_64 architectures.
Who Can Run This Command : Root User or a sudo user.
Output: When this package is installed, the "hwlist" command would be available to run. This gets created in "/usr/bin" directory by default.


To install this package, download the package and run either 'yum' or 'rpm' to get installed on Red Hat variant systems. It would need 'dmidecode', 'smartmontools', & 'sysstat' packages as dependency. On most systems these packages gets installed by default unless modified and they are part of the standard ISO install image.

You may download it locally using the GitHub link provided at the end, or using 'wget' as shown if your system is connected to internet:


This would download 'hwlist-2.0-1.noarch.rpm' file to the current working directory. Similarly, download the GPGkey using 'wget' as :


Verify the package before installing:- Make sure to download the “RPM-GPG-KEY-hwlist” (key) to rpmkeyring of the system so that the downloaded package could be verified against tampering of the software. Otherwise, if you run a signature verify on the package downloaded it would say ..

So, download the key and import into the system rpm keyring and then verify the package integrity, and this time it would pass. This would prove the package integrity against unauthorized sources tampering it. It would be a good practice to do this before installing the package.

Good to install:-

So, if all those packages are available then you could simply run 'rpm -ivh hwlist-2.0-1.noarch.rpm', or 'yum install hwlist-2.0-1.noarch.rpm' command as well.

Let’s verify if the package is installed successfully.

Now, the "hwlist" command is available which is installed in "/usr/bin" directory.

Installing package on SuSE systems:- Use ‘zypper install <PackageName>’ command to get the package installed on SLES systems.
Installing package on Debian systems:- On Debian based system, we could use use ‘alien’ to convert a .rpm package into .deb file. If ‘alien’ command not available then install this first using the command “apt-get install alien”. After this run the command “alien <packagename>" to convert it into .deb file which can be installed later using “dpkg -i <debfile>” as shown in below snip:-
NOTE:- For older versions such as RHEL5.x one could still use the earlier "" script which can downloaded from the earlier release file from the github page provided at the bottom of this page.

This is a user-friendly, interactive, simple command and needs an argument to be passed to get details. This would help someone who is looking to get information about system hardware such as RAM (primary memory), CPU (processor), hard drive, PCI devices, network adapter & interface details etc,.  This would also print details of operating system such as file system usage, I-node usage, currently mounted file systems, number of zombie process found, load average, CPU & swap usage data, top processor/memory consuming processes etc,.

When called without arguments it would simply print out a short help message as shown below:-

Get Help:- To get help run this command with “--help OR --info” as an argument  which would open up the help page which can be scrolled up/down and hit 'q' to quit the page.

So, pass the argument as required to the produce required details. For example, to print processor (CPU) details such as CPU Manufacturer, Serial Number etc., run the "hwlist" command with “--cpu” as an argument.

Likewise, to get details about Operating System such as Linux Variant, Hostname, Server Manufacturer, Server Serial Number etc., and to get system BIOS details call the command with “--system” as an argument as shown :-

NOTE:- This command can list out multipathed drives (if available) separate and network bonding interfaces would get listed out separately.

If you wish to dump all the details into a text file for later reference or to send it somewhere else, you could do so now. To get this done, execute the command with “--dump <DumpFileName>” as shown below:-

The above command would dump all hardware & operating system details on to file "/tmp/hardware-details.out" which is a simple text file with complete details.


There is a bundled tar file named 'hwlist-2.0-1.tar.gz' which got two files, a binary rpm "hwlist-2.0-1.noarch.rpm" & "RPM-GPG-KEY-hwlist" PGP public key block file. First import the key file into rpm keyring as explained in the install section and then install the binary rpm.

View the main github page:

All the best!


Puran singh said...

Good one, thanks for sharing

Sadashiva Murthy said...

Thanks Puran.

J Balajee said...

Sir, can u give the script for shutdown all ubuntu system from server in lab send to this mail id

Sadashiva Murthy said...


Please check my recent post:

Sadashiva Murthy M

karthi said...

Hi Siva bro Nice post especially i liked your script ... Motivating too...visit my blog .... I also try scripting my expectation in hardware related script filed in your blog.. thanks for your explained post

Anonymous said...

good one..

Anonymous said...

Awesome script. Could you update the script to collect temperature and fan speed?

Nazeer Qureshi said...

I am unable to run this script.

: command not found
: command not found
' line 37: syntax error near unexpected token `
' line 37: `head_fun()

Sadashiva Murthy said...

Please check the script file that you are running. Sometimes, when script file gets copied or moved, some extra characters gets added at the end of each line. Check this and make sure no such characters are added up. Also, make sure indentation is not altered when you copy file.

ychaouche said...

Hello and thank you so much for this script, best output I could get from all other scripts I have tried : <- top, strips off uninstalled modules
dmidecode <- best, not too much details
hwinfo <- good, too much detail
inxi <- very readable
lshw <- not very informative

Anonymous said...

Useful script. thank you

Anonymous said...

One of the best sites for Unix. Neat and clear explanation of topics.
Thanks for explaining the script.


Raghavendra shettigar said...

Good Document about hwlist, thanks for sharing the detailed instruction.

Anonymous said...

Very helpful indeed.