How to install LSHW and use on OpenSUSE Leap 42.3

To Install lshw and Use on OpenSUSE Leap 42.3

lshw (stands for Hardware Lister) is a small nifty tool that generates detailed reports about various hardware components on the machine such as memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, usb, network card, graphics cards, multimedia, printers, bus speed, etc.  lshw, when used  without any options would generate all the detected hardware report in single shot which is no use since you can’ t see any information properly. There are many ways through which  lshw can be used and this article covers the method to install and use lshw. 

 

Installing  lshw

First you need to install the lshw application by making use of the following command.

linuxhelp:~ # zypper install lshw
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  lshw

1 new package to install.
Overall download size: 249.3 KiB. Already cached: 0 B. After the operation,
additional 792.2 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package lshw-B.02.18-3.2.x86_64 (1/1), 249.3 KiB (792.2 KiB unpacked)
Retrieving: lshw-B.02.18-3.2.x86_64.rpm ..................................[done]
Checking for file conflicts: .............................................[done]
(1/1) Installing: lshw-B.02.18-3.2.x86_64 ................................[done]
Display Full Information

 

After installing, if you need to get complete information on lshw in your system, you shall simply run the following command.

linuxhelp:~ # lshw
USB                         
www.linuxhelp1.com 
    description: Computer
    product: VMware Virtual Platform
    vendor: VMware, Inc.
    version: None
    serial: VMware-56 4d ff af 3a d4 be d7-fa 1e 5c e4 b6 79 b0 97
    width: 4294967295 bits
    capabilities: smbios-2.7 dmi-2.7 vsyscall32
    configuration: administrator_password=enabled boot=normal frontpanel_password=unknown keyboard_password=unknown power-on_password=disabled uuid=564DFFAF-3AD4-BED7-FA1E-5CE4B679B097
  *-core
       description: Motherboard
       product: 440BX Desktop Reference Platform
       vendor: Intel Corporation
       physical id: 0
       version: None
       serial: None
     *-firmware
          description: BIOS
          vendor: Phoenix Technologies LTD
          physical id: 0
          version: 6.00
          date: 07/02/2015
          size: 86KiB
.
.
.
  *-pci:33
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.7
             bus info: pci@0000:00:18.7
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:55 memory:fb500000-fb5fffff ioport:e5b00000(size=1048576)
     *-scsi
          physical id: 1
          logical name: scsi2
          capabilities: emulated
        *-cdrom
             description: DVD-RAM writer
             product: VMware IDE CDR10
             vendor: NECVMWar
             physical id: 0.0.0
             bus info: scsi@2:0.0.0
             logical name: /dev/sr0
             version: 1.00
             capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
             configuration: ansiversion=5 status=open
  *-remoteaccess UNCLAIMED
       vendor: Intel
       physical id: 1
       capabilities: inbound

 

You can also display information using short or businfo options with the lshw command in the following two scenarios.

linuxhelp:~ # lshw -short
H/W path           Device     Class       Description
=====================================================
                              system      VMware Virtual Platform
/0                            bus         440BX Desktop Reference Platform
/0/0                          memory      86KiB BIOS
/0/4                          processor   Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
/0/4/15                       memory      16KiB L1 cache
/0/25                         memory      1664MiB System Memory
/0/25/0                       memory      1GiB DIMM DRAM EDO
/0/25/1                       memory      512MiB DIMM DRAM EDO
/0/25/2                       memory      128MiB DIMM DRAM EDO
/0/25/3                       memory      DIMM DRAM [empty]
/0/25/4                       memory      DIMM DRAM [empty]
/0/25/5                       memory      DIMM DRAM [empty]
/0/25/6                       memory      DIMM DRAM [empty]
.
.
.
.
/0/100/17.2                   bridge      PCI Express Root Port
/0/100/17.3                   bridge      PCI Express Root Port
/0/100/17.4                   bridge      PCI Express Root Port
/0/100/17.5                   bridge      PCI Express Root Port
/0/100/17.6                   bridge      PCI Express Root Port
/0/100/17.7                   bridge      PCI Express Root Port
/0/100/18                     bridge      PCI Express Root Port
/0/100/18.1                   bridge      PCI Express Root Port
/0/100/18.2                   bridge      PCI Express Root Port
/0/100/18.3                   bridge      PCI Express Root Port
/0/100/18.4                   bridge      PCI Express Root Port
/0/100/18.5                   bridge      PCI Express Root Port
/0/100/18.6                   bridge      PCI Express Root Port
/0/100/18.7                   bridge      PCI Express Root Port
/0/1               scsi2      storage     
/0/1/0.0.0         /dev/sr0   disk        VMware IDE CDR10
/1                            system      

linuxhelp:~ # lshw -businfo
Bus info          Device     Class       Description
====================================================
                             system      VMware Virtual Platform
                             bus         440BX Desktop Reference Platform
                             memory      86KiB BIOS
cpu@0                        processor   Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
                             memory      16KiB L1 cache
                             memory      1664MiB System Memory
                             memory      1GiB DIMM DRAM EDO
                             memory      512MiB DIMM DRAM EDO
                             memory      128MiB DIMM DRAM EDO
                             memory      DIMM DRAM [empty]
                             memory      DIMM DRAM [empty]
                             memory      DIMM DRAM [empty]
.
.
.
pci@0000:00:18.2             bridge      PCI Express Root Port
pci@0000:00:18.3             bridge      PCI Express Root Port
pci@0000:00:18.4             bridge      PCI Express Root Port
pci@0000:00:18.5             bridge      PCI Express Root Port
pci@0000:00:18.6             bridge      PCI Express Root Port
pci@0000:00:18.7             bridge      PCI Express Root Port
                  scsi2      storage     
scsi@2:0.0.0      /dev/sr0   disk        VMware IDE CDR10
                             system      

 

 

You shall also use the lshw command with the class system option to display system information

linuxhelp:~ #  lshw -class system
www.linuxhelp1.com          
    description: Computer
    product: VMware Virtual Platform
    vendor: VMware, Inc.
    version: None
    serial: VMware-56 4d ff af 3a d4 be d7-fa 1e 5c e4 b6 79 b0 97
    width: 4294967295 bits
    capabilities: smbios-2.7 dmi-2.7 vsyscall32
    configuration: administrator_password=enabled boot=normal frontpanel_password=unknown keyboard_password=unknown power-on_password=disabled uuid=564DFFAF-3AD4-BED7-FA1E-5CE4B679B097
  *-remoteaccess UNCLAIMED
       vendor: Intel
       physical id: 1
       capabilities: inbound

 

To display information about a memory and related details you shall run the command with the class memory command.

linuxhelp:~ # lshw -class memory
  *-firmware                
       description: BIOS
       vendor: Phoenix Technologies LTD
       physical id: 0
       version: 6.00
       date: 07/02/2015
       size: 86KiB
       capabilities: isa pci pcmcia pnp apm upgrade shadowing escd cdboot bootselect edd int5printscreen int9keyboard int14serial int17printer int10video acpi smartbattery biosbootspecification netboot
  *-cache
       description: L1 cache
       physical id: 15
       slot: L1
       size: 16KiB
       capacity: 16KiB
       capabilities: asynchronous internal write-back
       configuration: level=1


You can also make the the  information about the processor and related details  displayed on your screen by using the    -class processor. 

linuxhelp:~ # lshw -class processor
  *-cpu                     
       description: CPU
       product: Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
       vendor: Intel Corp.
       physical id: 4
       bus info: cpu@0
       version: Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz
       slot: CPU #000
       size: 3GHz
       capacity: 4230MHz
       width: 64 bits
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb pln pts dtherm fsgsbase tsc_adjust smep
       configuration: cores=1 enabledcores=1
.
.
.
.

*-bank:125
          description: DIMM [empty]
          physical id: 7d
          slot: NVD #61
          width: 32 bits
     *-bank:126
          description: DIMM [empty]
          physical id: 7e
          slot: NVD #62
          width: 32 bits
     *-bank:127
          description: DIMM [empty]
          physical id: 7f
          slot: NVD #63
          width: 32 bits

 

Also, display information about hard disk and related details by making use of the class disk option.

linuxhelp:~ # lshw -class disk
  *-disk                    
       description: SCSI Disk
       product: VMware Virtual S
       vendor: VMware,
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 1.0
       size: 20GiB (21GB)
       capabilities: 7200rpm partitioned partitioned:dos
       configuration: ansiversion=2 logicalsectorsize=512 sectorsize=512 signature=0003044e
  *-cdrom
       description: DVD-RAM writer
       product: VMware IDE CDR10
       vendor: NECVMWar
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sr0
       version: 1.00
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 status=open

 

To display information about storage and related details. All the information regarding    product name, vendor, physical id, bus info, width, clock, capabilities, and configuration, etc. will be displayed on the screen. 

linuxhelp:~ # lshw -class storage
  *-ide                     
       description: IDE interface
       product: 82371AB/EB/MB PIIX4 IDE
       vendor: Intel Corporation
       physical id: 7.1
       bus info: pci@0000:00:07.1
       version: 01
       width: 32 bits
       clock: 33MHz
       capabilities: ide bus_master
       configuration: driver=ata_piix latency=64
       resources: irq:0 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:1060(size=16)
  *-scsi
       description: SCSI storage controller
       product: 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
       vendor: LSI Logic / Symbios Logic
       physical id: 10
       bus info: pci@0000:00:10.0
       logical name: scsi0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: scsi bus_master cap_list rom scsi-host
       configuration: driver=mptspi latency=64 maxlatency=255 mingnt=6
       resources: irq:17 ioport:1400(size=256) memory:feba0000-febbffff memory:febc0000-febdffff memory:c0008000-c000bfff
  *-scsi
       physical id: 1
       logical name: scsi2
       capabilities: emulated

 


To display information about volume and related details, use volume class.This will print file system type, vendor, physical id, bus info, logical name, serial, size, capabilities, and configuration, etc,.

linuxhelp:~ # lshw -class volume
  *-volume:0                
       description: Linux swap volume
       physical id: 1
       bus info: scsi@0:0.0.0,1
       logical name: /dev/sda1
       version: 1
       serial: c5970254-e36c-4fb7-8695-a1d6aab85229
       size: 2039MiB
       capacity: 2039MiB
       capabilities: primary nofs swap initialized
       configuration: filesystem=swap pagesize=4096
  *-volume:1
       description: EXT4 volume
       vendor: Linux
       physical id: 2
       bus info: scsi@0:0.0.0,2
       logical name: /dev/sda2
       logical name: /boot
       version: 1.0
       serial: 52b7e2b5-ef43-4abd-bedd-77ab8140ceab
       size: 400MiB
       capacity: 400MiB
       capabilities: primary bootable journaled extended_attributes huge_files dir_nlink recover extents ext4 ext2 initialized
       configuration: created=2017-10-09 23:15:52 filesystem=ext4 lastmountpoint=/boot modified=2017-10-10 18:21:28 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2017-10-10 18:21:28 state=mounted
  *-volume:2
       description: EXT4 volume
       vendor: Linux
       physical id: 3
       bus info: scsi@0:0.0.0,3
       logical name: /dev/sda3
       logical name: /
       version: 1.0
       serial: d0d05ae0-2b8b-4544-9cbc-4d37a6c18d26
       size: 17GiB
       capacity: 17GiB
       capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
       configuration: created=2017-10-09 23:15:52 filesystem=ext4 lastmountpoint=/ modified=2017-10-10 18:21:21 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2017-10-10 18:21:24 state=mounted&emsp 

 

To display information about volume, disk & storage and related details, use following three class disk, storage and volume with short option.

linuxhelp:~ # lshw -short -class disk -class storage -class volume
H/W path           Device     Class       Description
=====================================================
/0/100/7.1                    storage     82371AB/EB/MB PIIX4 IDE
/0/100/10          scsi0      storage     53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
/0/100/10/0.0.0    /dev/sda   disk        21GB VMware Virtual S
/0/100/10/0.0.0/1  /dev/sda1  volume      2039MiB Linux swap volume
/0/100/10/0.0.0/2  /dev/sda2  volume      400MiB EXT4 volume
/0/100/10/0.0.0/3  /dev/sda3  volume      17GiB EXT4 volume
/0/1               scsi2      storage     
/0/1/0.0.0         /dev/sr0   disk        VMware IDE CDR10
Display Bridge Information

 

To display information about bridge and related details, use bridge class.

linuxhelp:~ # lshw -class bridge
  *-pci                     
       description: Host bridge
       product: 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
       vendor: Intel Corporation
       physical id: 100
       bus info: pci@0000:00:00.0
       version: 01
       width: 32 bits
       clock: 33MHz
       configuration: driver=agpgart-intel
       resources: irq:0
     *-pci:0
          description: PCI bridge
          product: 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge
          vendor: Intel Corporation
          physical id: 1
          bus info: pci@0000:00:01.0
          version: 01
          width: 32 bits
          clock: 66MHz
          capabilities: pci normal_decode bus_master
.
.
.
.
*-pci:33
          description: PCI bridge
          product: PCI Express Root Port
          vendor: VMware
          physical id: 18.7
          bus info: pci@0000:00:18.7
          version: 01
          width: 32 bits
          clock: 33MHz
          capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
          configuration: driver=pcieport
          resources: irq:55 memory:fb500000-fb5fffff ioport:e5b00000(size=1048576)

 


To display information about display card details like VGA and related details, use display class.

linuxhelp:~ # lshw -class display
  *-display                 
       description: VGA compatible controller
       product: SVGA II Adapter
       vendor: VMware
       physical id: f
       bus info: pci@0000:00:0f.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=vmwgfx latency=64
       resources: irq:16 ioport:1070(size=16) memory:e8000000-efffffff memory:fe000000-fe7fffff memory:c0000000-c0007fff

 

Use the  generic option to display all other  hardware details 

linuxhelp:~ # lshw -class generic
  *-generic                 
       description: System peripheral
       product: Virtual Machine Communication Interface
       vendor: VMware
       physical id: 7.7
       bus info: pci@0000:00:07.7
       version: 10
       width: 64 bits
       clock: 33MHz
       capabilities: msi msix bus_master cap_list
       configuration: driver=vmw_vmci latency=64 maxlatency=255 mingnt=6
       resources: irq:16 ioport:1080(size=64) memory:febfe000-febfffff

With this, the installation of lshw comes to an end.

FAQ
Q
What the term of using the LSHW?
A
lshw (stands for Hardware Lister) is a small nifty tool that generates detailed reports about various hardware components on the machine such as memory configuration, firmware version, mainbo
Q
Why I'm getting segfaults while running commands. What can I do?
A
If your Chrome OS version is 67 or above, you likely have the glibc223 package installed. To fix, type the following:

$ sudo rm -rf /usr/local
$ curl -Ls git.io/vddgY | bash
Q
How do I display the Chrome OS version from the shell?
A
crew install lsb_release and then enter lsb_release -a. Alternatively, you could enter cat /etc/lsb-release. If you only want the major release, type crew const CHROMEOS_RELEASE.
Q
How to Install lshw on OpenSUSE Leap?
A
first, you need to install the lshw application by making use of the following command:
# zypper install lshw
Q
How can we see the system information?
A
You shall also use the lshw command with the class system option to display system information.
# lshw -class system