{{Short description|Command that prints information about PCI buses and devices}} {{Lowercase title}} {{Infobox software | name = pciutils | title = | logo = <!-- File: --> | screenshot = <!-- File: --> | caption = | collapsible = | author = | developer = Martin Mareš | released = {{Start date|1998|02|07|df=yes}} | discontinued = | latest release version = 3.14.0 | latest release date = {{Start date and age|2025|6|21|df=yes}} | programming language = C | operating system = Linux, Unix-like, Microsoft Windows, KolibriOS | platform = All ports can work on at least x86 (32-bit and/or 64-bit); the Linux, FreeBSD, NetBSD, OpenBSD, and AIX ports can also work on other CPU architectures. | size = | genre = Utility software | license = GNU General Public License | website = {{URL|http://mj.ucw.cz/sw/pciutils}} }} '''lspci''' is a command on Unix-like operating systems that prints ("lists") detailed information about all PCI buses and devices in the system.<ref>{{Cite web|url=https://linux.die.net/man/8/lspci|title=Lspci(8): All PCI devices - Linux man page}}</ref> It is based on a common portable library ''libpci'' which offers access to the PCI configuration space on a variety of operating systems.
__TOC__ {{clear}}
==Example usage== Example output on a Linux system: <syntaxhighlight lang="console" style="overflow: auto"># lspci 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] 00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7 01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter 02:00.0 Non-Volatile memory controller: Sandisk Corp PC SN520 NVMe SSD (rev 01) 03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c3) 03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller 03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor 03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller 03:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver </syntaxhighlight>
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".<ref>{{Cite web|title=lspci(8): all PCI devices - Linux man page|url=https://linux.die.net/man/8/lspci|access-date=2021-04-08|website=linux.die.net}}</ref>
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><ref>{{man|8|lsusb|die.net}}</ref> 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 [http://www.linux-usb.org/USB-guide/x173.html /proc/bus/usb] interface (e.g., Linux kernel 2.3.15 or newer).
Example output on a Linux system: <syntaxhighlight lang="console" style="overflow: auto"># lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 004: ID 06cb:0081 Synaptics, Inc. Bus 003 Device 003: ID 5986:2115 Acer, Inc Integrated Camera Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0bda:b023 Realtek Semiconductor Corp. RTL8822BE Bluetooth 4.2 Adapter Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub </syntaxhighlight>
== hwinfo == <code>hwinfo</code><ref>{{Cite web|title=hwinfo(8) — hwinfo — Debian testing — Debian Manpages|url=https://manpages.debian.org/testing/hwinfo/hwinfo.8.en.html.gz|access-date=2020-12-17|website=manpages.debian.org}}</ref> is for all the hardware.<ref>[https://h-node.org/wiki/page/en/Discover-your-hardware Discover your hardware] in Linux, H-node.org</ref> Hwinfo output reports for various computer models are collected in a public GitHub repository.<ref>[https://github.com/linuxhw/HWInfo Large collection of hwinfo reports for various computer models]</ref>
== lshw == <code>lshw</code> is a subset of what hwinfo presents.<ref>[http://www.ezix.org/project/wiki/HardwareLiSter#Howtointerpretlshwsoutput How to interpret lshw output] on Ezix.org; retrieved in October 2016</ref>
== 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 [http://www.freebsd.org/cgi/man.cgi?query=pciconf&apropos=0&sektion=0&manpath=FreeBSD+7.1-RELEASE&format=html man page].
The [http://www.hwinfo.com/ 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".<ref>{{Cite web |last=Malík |first=Martin |title=HWiNFO - Free System Information, Monitoring and Diagnostics |url=https://www.hwinfo.com/ |url-status=live |archive-url=https://web.archive.org/web/20240401142051/https://www.hwinfo.com/ |archive-date=2024-04-01 |access-date=2024-04-25 |website=HWiNFO}}</ref>
==Similar commands== * dmesg — prints the message buffer of the kernel. * uname — prints the name, version and other details about the current machine and the operating system. * lsscsi — prints information about mass storage devices.
== See also == * util-linux * /sys
== References == {{Reflist}}
== External links == * {{Official website|http://mj.ucw.cz/sw/pciutils}} * [http://mj.ucw.cz/pciutils.shtml The PCI utilities home]. * [https://pciids.sourceforge.net/ The home of the pci.ids] file, with its [http://pci-ids.ucw.cz/read/PC/ Online list of ID's]. * [http://kmuto.jp/debian/hcl/ Online device driver check page that maps PCI Ids to Linux drivers].
Category:Unix software Category:Hardware in Linux