You are here

System Harware Information in Linux

All-In-One Tools

Hardware Lister:

Hardware Lister can be used for getting all the hardware information of a system. Some example usage are given below:

# apt-get install lshw lshw-gtk
# lshw (Displays detailed hardware information)
# lshw-gtk (Gives a nice graphical view of the hardware information) 
# lshw -short (Lists hardware in a compact format)
# lshw -class disk -class storage (Lists all disks and storage controllers in the system)
# lshw -html -class network (Lists all network interfaces in HTML)

Refer to the link in the References section to get the complete list of device classes.


Another tool which serves a similar purpose is dmidecode.

# apt-get install dmidecode
# dmidecode (Display detialed hardware information)
# dmidecode --type bios (Display information related to BIOS)

The various types permitted can be got from the manpage of dmidecode.

Component Information

Most of the below commands should be run as root.

Retrieve BIOS information such as Vendor, Version, Characteristics, etc.

# dmidecode --type bios
# biosdecode

Retrieve a lot of useful information such as Manufacturer, Product Name, Version, Wake-up Type, etc.

# lshw -class system
# dmidecode --type system

Prints motherboard information such as Manufacturer, Product Name, Serial Number and also information of onboard devices.

# dmidecode --type baseboard
# lspci

Get processor information such as the Manufacturer, Version, etc.

# lshw -class processor
# dmidecode --type processor
# cat /proc/cpuinfo

Get memory information such as the numver of memory slots, RAM information in each slot (if installed), etc.

# lshw -class memory
# dmidecode --type memory
# cat /proc/meminfo
# free -m

PCI/PCIe Slots and USB devices:
Retrieve information about onboard PCI slots, attached USB devices, etc.

# lshw -class bus
# dmidecode --type connector --type slot
# lspci
# lsusb

Hard Disk(s):
Retrieve hard disk(s) details such as size, model, etc.

# lshw -class storage -class disk --class volume
# fdisk -l
# hdparm -I /dev/sda

VPD stands for "vital product data" information that can be found in almost all IBM and Lenovo computers.

# vpddecode

System Hardware Snapspot

This is especially useful when giving your laptop or desktop to service centres for repair. You can take a snapshot before and after and compare them to ensure that no parts have been replaced. It is highly recommended that you run the below commands as root.

# lshw -short > lshw.short
# lshw -xml > lshw.xml
# lshw -json > lshw.json
# lshw -html > lshw.html



Add new comment