The lshw is a command line tool for displaying detailed information about hardware components on a system. The tool enables to view details about CPU, RAM, network interfaces, USB controllers, etc. This tutorial shows how to install lshw on Ubuntu 22.04.
Run command to update the package lists:
sudo apt update
sudo apt install -y lshw
lshw command without any arguments, to get detailed information about all hardware components.
-short option lets to get brief information about the hardware components.
sudo lshw -short
H/W path Device Class Description ========================================================= system VMware Virtual Platform /0 bus 440BX Desktop Reference Platform /0/0 memory 86KiB BIOS /0/1 processor Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz /0/1/0 memory 16KiB L1 cache ...
-class option, possible to output information for specific hardware component:
sudo lshw -class processor
sudo lshw -class memory
sudo lshw -class network
sudo lshw -class bus
If you decided to completely remove lshw, run the following command:
sudo apt purge --autoremove -y lshw