2018-01-02 00:40:38 +08:00
|
|
|
# lshw
|
|
|
|
|
|
|
|
> List detailed information about hardware configurations as root user.
|
2025-05-13 19:04:07 +10:00
|
|
|
> More information: <https://ezix.org/project/wiki/HardwareLiSter>.
|
2018-01-02 00:40:38 +08:00
|
|
|
|
2025-05-13 19:04:07 +10:00
|
|
|
- Launch the X11 GUI (if available):
|
2018-01-02 00:40:38 +08:00
|
|
|
|
|
|
|
`sudo lshw -X`
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- List all hardware in tabular format:
|
2018-01-02 00:40:38 +08:00
|
|
|
|
|
|
|
`sudo lshw -short`
|
|
|
|
|
2025-05-13 19:04:07 +10:00
|
|
|
- List multiple class of hardware (all disks and storage controllers) in tabular format:
|
2018-01-02 00:40:38 +08:00
|
|
|
|
2025-05-13 19:04:07 +10:00
|
|
|
`sudo lshw {{[-c|-class]}} disk {{[-c|-class]}} storage -short`
|
2018-01-02 00:40:38 +08:00
|
|
|
|
2025-05-10 19:53:24 +03:00
|
|
|
- Save all network interfaces to an HTML/XML/JSON file:
|
2018-01-02 00:40:38 +08:00
|
|
|
|
2025-05-10 19:53:24 +03:00
|
|
|
`sudo lshw {{[-c|-class]}} network -{{html|xml|json}} > interfaces{{.html|.xml|.json}}`
|
2025-05-13 19:04:07 +10:00
|
|
|
|
|
|
|
- List network interfaces without revealing sensitive information (IP addresses, serial numbers, etc.):
|
|
|
|
|
|
|
|
`sudo lshw {{[-c|-class]}} network -sanitize`
|
|
|
|
|
|
|
|
- List a particular class of hardware:
|
|
|
|
|
|
|
|
`sudo lshw {{[-c|-class]}} {{system|bridge|memory|processor|address|storage|disk|tape|bus|network|display|input|printer|multimedia|communication|power|volume|generic}}`
|