lshw
system informationLinux
The lshw command is one of the most frequently used commands in Linux/Unix-like operating systems. lshw List hardware information
Quick Reference
Command Name:
lshw
Category:
system information
Platform:
Linux
Basic Usage:
lshw [options] [arguments]
Common Use Cases
Syntax
lshw [options]
Options
Option | Description |
---|---|
-short |
Show a short summary of the hardware tree |
-class CLASS |
Show only specified class of hardware (e.g., disk, network, memory) |
-C CLASS |
Same as -class CLASS |
-businfo |
Show bus information and hardware paths |
-json |
Output hardware tree as JSON |
-html |
Output hardware tree as HTML |
-xml |
Output hardware tree as XML |
-sanitize |
Hide sensitive information (serial numbers, etc.) |
-numeric |
Output numeric IDs (for PCI, USB, etc.) |
-quiet |
Don't display status messages |
-disable TEST |
Disable a test (like pci, isapnp, cpuid, etc.) |
-enable TEST |
Enable a test (like pci, isapnp, cpuid, etc.) |
-version |
Display version information |
-help |
Display help information |
Examples
How to Use These Examples
The examples below show common ways to use the lshw
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
sudo lshw