lshw command

lshw command get hardware information on linux

lshw command get hardware information on linux

Lshw – List hardware

This command will display detail information of hardware in your system. It can give memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc.

Install lshw

Ubuntu, Debian and Fedora users can install by running below command.
# ubuntu, debian

# fedora, centos (epel)

Using lshw

lshw run as root or sudo gives the maximum amount of information,

1. Get full information

Running lshw without any options would give full information about all detected hardware.


hardware information linux | lshw

2. Get information in short

With the help of “-short” it will give a brief information report about the hardware devices.


hardware information linux | lshw

3. Get only memory information

To display information about the memory, specify the memory class


hardware information linux | lshw

4. Get processor information

With class processor, lshw would display information about the cpu. It is better to not use the short option and get full details about the processor.


hardware information linux | lshw

5. Disk drives

Display the disk drives with the disk class.


hardware information linux | lshw

Get information about the partitions and controllers also, specify the storage and volume class along with the disk class.

hardware information linux | lshw

8. Generate report in html/xml format

Lshw is capable of producing reports in html, xml and json formats

For xml format

You May Also Enjoy Reading This …