LSHW(1)
๐ LSHW(1) โ lshw โจ
okay so bestie, lshw is literally the tool that lists hardware for you ๐
It's a small program that pulls out super detailed info on your machine's hardware setup. It can report exact memory config, firmware version, mainboard config, CPU version and speed, cache config, bus speed, etc. ๐ค on DMI-capable x86 or IA-64 systems, and on some PowerPC machines (PowerMac G4 is known to work ๐).
It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB. The whole list is giving main character energy ๐
๐ SYNOPSIS ๐
lshw [ -version ]
lshw [ -help ]
lshw [ -X ]
lshw [ [ -html ] [ -short ] [ -xml ] [ -json ] [ -businfo ] ] [
-dump filename ] [ -class class... ] [ -disable test... ] [ -enable
test... ] [ -sanitize ] [ -numeric ] [ -quiet ] [ -notime ]
๐ฆ DESCRIPTION ๐ฆ
Here's the vibe check for every flag, bestie ๐ซถ
-versionโ shows you the version oflshwand then exits ๐ธ-helpโ shows the available command line options and quits ๐-Xโ launches the X11 GUI (if it's available) โจ-htmlโ outputs the device tree as an HTML page ๐-xmlโ outputs the device tree as an XML tree ๐-jsonโ outputs the device tree as a JSON object (JavaScript Object Notation) ๐ง-shortโ outputs the device tree showing hardware paths, very much like the output of HP-UX'sioscan๐-businfoโ outputs the device list showing bus information, detailing SCSI, USB, IDE and PCI addresses ๐ฅ-dump filenameโ displays output and dumps collected info into a file (SQLite database) ๐๏ธ-class classโ only shows the given class of hardware. You can findclassusinglshw -shortorlshw -businfo๐-C classโ alias for-class class๐-enable testand-disable testโ enables or disables a test ๐ Thetestcan be:dmi(for DMI/SMBIOS extensions)device-tree(for OpenFirmware device tree)spd(for memory Serial Presence Detect)memory(for memory-size guessing heuristics)cpuinfo(for kernel-reported CPU detection)cpuid(for CPU detection)pci(for PCI/AGP access)isapnp(for ISA PnP extensions)pcmcia(for PCMCIA/PCCARD)ide(for IDE/ATAPI)usb(for USB devices)scsi(for SCSI)network(for network interfaces detection)
-quietโ don't display status ๐คซ-sanitizeโ removes potentially sensitive info from the output (IP addresses, serial numbers, etc.) ๐-numericโ also displays numeric IDs (for PCI and USB devices) ๐ข-notimeโ excludes volatile attributes (timestamps) from the output โฐ
๐ BUGS ๐
lshw currently does not detect Firewire (IEEE1394) devices. Yikes ๐
Not all architectures supported by GNU/Linux are fully supported (e.g. CPU detection). Not every platform is on the guest list yet ๐ญ
"Virtual" SCSI interfaces used for SCSI emulation over IDE are not reported correctly yet. ๐
๐ธ NOTES ๐ธ
lshw must be run as super user or it will only report partial information. Bestie, sudo it ๐ซถ
๐๏ธ FILES ๐๏ธ
/usr/local/share/pci.ids/usr/share/pci.ids/etc/pci.ids/usr/share/hwdata/pci.idsโ a list of all known PCI IDs (vendors, devices, classes and subclasses). If compiled with zlib support,lshwwill look forpci.ids.gzfirst, then forpci.ids. โจ/proc/bus/pci/*โ used to access the configuration of installed PCI buses and devices ๐/proc/ide/*โ used to access the configuration of installed IDE buses and devices ๐พ/proc/scsi/*,/dev/sg*โ used to access the configuration of installed SCSI devices ๐งท/dev/cpu/*/cpuidโ used on x86 platforms to access CPU-specific configuration ๐ง/proc/device-tree/*โ used on PowerPC platforms to access OpenFirmware configuration ๐/proc/bus/usb/*โ used to access the configuration of installed USB buses and devices ๐/sys/*โ used on 2.6 kernels to access hardware/driver configuration information ๐
๐ง EXAMPLES ๐ง
lshw -short
Lists hardware in a compact format ๐
lshw -class disk -class storage
Lists all disks and storage controllers in the system ๐พ
lshw -html -class network
Lists all network interfaces in HTML ๐
lshw -disable dmi
Don't use DMI to detect hardware ๐
๐ SEE ALSO ๐
/proc/*, linuxinfo(1), lspci(8), lsusb(8) ๐ฆ
๐ COPYING ๐
lshw is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) version 2. ๐
๐ฉโ๐ป AUTHOR ๐ฉโ๐ป
lshw is maintained by Lyonel Vincent <lyonel@ezix.org>. Major thanks to them ๐
๐ OTHER INFO ๐
The webpage for lshw is at <URL:http://lshw.ezix.org/> ๐
love you bestie, this was so iconic ๐ lshw, revision $Rev$, last updated 15 October 2020 ๐ฆ periodt ๐
๐ฆ where this page comes from
- alpine 3.24: lshw-doc 02.20-r1 ยท GPL-2.0-only
- arch rolling: lshw B.02.20-3 ยท GPL
- centos-stream 10: lshw B.02.20-11.el10 ยท GPL-2.0-only
- centos-stream 9: lshw B.02.20-4.el9 ยท GPLv2
- debian bookworm: lshw 02.19.git.2021.06.19.996aaad9c7-2+b1
- debian trixie: lshw 02.19.git.2021.06.19.996aaad9c7-2.1
- fedora 43: lshw B.02.20-10.fc43 ยท GPL-2.0-only
- fedora 43: lshw B.02.20-9.fc43 ยท GPL-2.0-only
- fedora 44: lshw B.02.20-11.fc44 ยท GPL-2.0-only
- nixos 26.05: lshw 02.20
- nixpkgs unstable: lshw 02.20
- opensuse-leap 16.0: lshw B.02.20-160000.3.2 ยท GPL-2.0-only
- opensuse-leap 16.0: lshw B.02.20-160000.3.2 ยท GPL-2.0-only
- opensuse-leap 16.0: lshw B.02.20-160000.3.2 ยท GPL-2.0-only
- opensuse-leap 16.0: lshw B.02.20-160000.3.2 ยท GPL-2.0-only
- ubuntu jammy: lshw 02.19.git.2021.06.19.996aaad9c7-2build1
- ubuntu jammy: lshw 02.19.git.2021.06.19.996aaad9c7-2ubuntu0.22.04.1
- ubuntu noble: lshw 02.19.git.2021.06.19.996aaad9c7-2build3
- ubuntu noble: lshw 02.19.git.2021.06.19.996aaad9c7-2ubuntu0.24.04.1
- ubuntu questing: lshw 02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1
- ubuntu questing: lshw 02.19.git.2021.06.19.996aaad9c7-2.1ubuntu1.1
- ubuntu resolute: lshw 02.19.git.2021.06.19.996aaad9c7-2.1ubuntu3
- ubuntu stonking: lshw 02.19.git.2021.06.19.996aaad9c7-2.1ubuntu3
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms