lshw

Updated

July 31, 2026

Overview

lshw lists hardware (CPU, memory, storage, NICs, firmware). Run as root for full DMI/PCI detail.

Syntax

sudo lshw [options]

Common Options

Option Description
-short Compact table
-class / -C Filter: network, disk, memory, cpu, system, display
-businfo Bus addresses
-json / -xml / -html Export formats
-sanitize Hide serials/UUIDs
-numeric Numeric vendor/device IDs
-quiet Less noise

Examples with Explanations

sudo lshw -short
sudo lshw -class network -short
sudo lshw -class disk
sudo lshw -class memory
sudo lshw -C network -businfo
sudo lshw -json | jq '.[0].product'
sudo lshw -sanitize -html > /tmp/hw.html

Inventory one-liners

sudo lshw -class system -short
sudo lshw -class cpu -short
sudo lshw -class network | egrep 'description|serial|product|logical name|capacity'