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 of lshw and 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's ioscan ๐Ÿ’…
  • -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 find class using lshw -short or lshw -businfo ๐Ÿ‘‘
  • -C class โ€” alias for -class class ๐ŸŽ€
  • -enable test and -disable test โ€” enables or disables a test ๐Ÿ™ˆ The test can 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, lshw will look for pci.ids.gz first, then for pci.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 ๐Ÿ’