lshw is a command line tool that displays detailed information about hardware components on a system. This tool can display details about CPU, RAM, network interfaces, USB controllers, and much more.
This tutorial explains how to install lshw on Raspberry Pi and run some commands.
sudo apt update sudo apt install -y lshw
In order to get detailed information about all hardware components, run the lshw without any arguments:
sudo lshw
You can use -short option to retrieve brief information about the hardware components:
sudo lshw -short
Here is what I saw running this
user@raspberrypi:~ $ sudo lshw -short H/W path Device Class Description ====================================================== system Raspberry Pi 4 Model B Rev 1.1 /0 bus Motherboard /0/1 processor cpu /0/1/0 memory 32KiB L1 Cache /0/2 processor cpu /0/2/0 memory 32KiB L1 Cache /0/3 processor cpu /0/3/0 memory 32KiB L1 Cache /0/4 processor cpu /0/4/0 memory 32KiB L1 Cache /0/5 processor l2-cache0 /0/6 memory 1848MiB System memory /0/0 bridge BCM2711 PCIe Bridge /0/0/0 bus VL805/806 xHCI USB 3.0 Controller /0/0/0/0 usb1 bus xHCI Host Controller /0/0/0/0/1 bus USB2.0 Hub /0/0/0/1 usb2 bus xHCI Host Controller /1 mmc0 bus MMC Host /1/1 /dev/mmcblk0 disk 15GB ASTC /1/1/1 /dev/mmcblk0p1 volume 512MiB Windows FAT volume /1/1/2 /dev/mmcblk0p2 volume 14GiB EXT4 volume /2 mmc1 bus MMC Host /2/1 generic SDIO Device /2/1/1 mmc1:0001:1 network 43430 /2/1/2 mmc1:0001:2 generic 43430 /2/1/3 mmc1:0001:3 communication 43430 /3 card0 multimedia vc4hdmi0 /4 card1 multimedia vc4hdmi1 /5 card2 multimedia Headphones /6 input0 input vc4-hdmi-0 /7 input1 input vc4-hdmi-1 /8 eth0 network Ethernet interface
Display only memory information
To display information about the memory, specify the memory class
$ sudo lshw -short -class memory
Display 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.
$ sudo lshw -class processor
Disk drives
Display the disk drives with the disk class.
$ sudo lshw -short -class disk
Network adapter information
Use the network class to display information about the network adapter/interface. Omitting the short option is a good idea to get detailed information about it.
$ sudo lshw -class network
Display address details with businfo
With the businfo option lshw would output the address details of pci, usb, scsi and ide devices
$ sudo lshw -businfo