Steps to Setup lshw (List Hardware) with Examples On Ubuntu 20.04 LTS

lshw is a open source linux command. It helps to display the detailed report about system hardware. It provides the information of firmware version, CPU version & speed, graphic card, bus speed, cache memory configuration,& configuration of memory.

There are some examples of lshw in ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install lshw (List Hardware)on system.

apt-get install lshw

  • No needs to install lshw on latest ubuntu 20.04 LTS.

Step 3: lshw (List Hardware)  Syntax & Examples:

lshw [-format] [-options ...]

  • To display all hardware information.

lshw

  • Here is the command output.

  • To list the hardware information in Short.

lshw -short

  • Here is the command output.

  • To display only memory information.

lshw -short -class memory

  • Here is the command output.

  • To display only processor information.

lshw -class processor

  • Here is the command output.

  • To display information about the partitions,specify the storage and volume class along with the disk class.

lshw -short -class disk -class storage -class volume

  • Here is the command output.

  • To display the information of Network adapter .

lshw -class network

  • Here is the command output.

  • To display address details with businfo(the address details of pci, usb, scsi and ide devices).

lshw -businfo

  • Here is the command output.

  • To generate the output in html/xml format.

lshw -html >test.html
lshw -xml >test.xml

  • To display the hardware information without the serial number.

lshw -sanitize

  • Here is the command output.

  • To list all the available option in lshw.

lshw -help

  • Here is the command output.

Leave a Reply