my-server
← Wiki

Lspci

lspci is a command on Unix-like operating systems that prints ("lists") detailed information about all PCI buses and devices in the system. It is based on a common portable library libpci which offers access to the PCI configuration space on a variety of operating systems.

Example usage

Example output on a Linux system:

Using <code>lspci -v</code>, <code>lspci -vv</code>, or <code>lspci -vvv</code> will display increasingly verbose details for all devices. <code>-d [<vendor>]:[<device>]</code> option specifies the vendor and device ID of the devices to display. Note that ":" can not be omitted, while the omitted <code><vendor></code> or <code><device></code> indicates "any value".

If many devices are shown as unknown (e.g. "Unknown device 2830 (rev 02)"), issuing the command <code>update-pciids</code> will usually correct this.

lsusb

<code>lsusb</code> is a similar command for USB buses and devices. To make use of all the features of this program, a system needs to use Linux kernel which supports the /proc/bus/usb interface (e.g., Linux kernel 2.3.15 or newer).

Example output on a Linux system:

hwinfo

<code>hwinfo</code> is for all the hardware. Hwinfo output reports for various computer models are collected in a public GitHub repository.

lshw

<code>lshw</code> is a subset of what hwinfo presents.

Other platforms

The equivalent command for FreeBSD is <code>pciconf -l</code>. <code>pciconf</code> can also perform other functions such as reading and writing PCI registers. For more information, see the man page.

The HWiNFO tool, which is not related to the <code>hwinfo</code> tool mentioned above, can be downloaded in binary form at no cost. It is claimed to be a "Comprehensive Hardware Analysis, Monitoring and Reporting for Windows and DOS".

Similar commands

  • dmesg &mdash; prints the message buffer of the kernel.
  • uname &mdash; prints the name, version and other details about the current machine and the operating system.
  • lsscsi &mdash; prints information about mass storage devices.

See also

References

External links