Skip to content

Linux lspci command

The Linux lspci command is a handy utility used to display detailed information about all PCI buses and devices in the system. It helps users identify devices connected to the PCI bus such as graphics cards, network adapters, and storage controllers. By running lspci, you can quickly gather information about the hardware on your system, including the vendor, device ID, driver in use, and more. This command is often used for troubleshooting hardware-related issues or to gather information about the system configuration. Explore the different options available with lspci to customize the output according to your needs.

lspci Syntax:

Terminal window
lspci [options] [parameters]

Options:

OptionDescription
-kShow kernel driver handling the devices
-tShow bus topology in a tree view
-vBe verbose (show more information)
-nnShow numeric IDs
-sShow only a specific device
-DShow PCI domains
-xxxShow hexadecimal dump of the standard part of the configuration space
-xxxxShow hexadecimal dump of the full configuration space

Parameters:

ParameterDescription
domainShow devices within the specified PCI domain

lspci Usage:

Show all PCI devices

Terminal window
lspci

Display a list of all PCI devices on the system.

Show details of a specific PCI device

Terminal window
lspci -v -s 00:10.0

Show detailed information about the PCI device with the address 00:10.0.

Display PCI devices in a tree-like format

Terminal window
lspci -t

Show PCI devices in a tree-like format to visualize their hierarchy.

Show PCI devices with their driver names

Terminal window
lspci -k

List PCI devices along with their driver names to understand which drivers are being used.

How do I show all PCI devices using lspci in Linux?

To display information about all PCI devices in Linux using the lspci command, use the following command:

Terminal window
lspci

How do I list PCI devices in detail with lspci in Linux?

To list detailed information about PCI devices in Linux using the lspci command, execute:

Terminal window
lspci -vv

How can I get a tree-like view of PCI devices using lspci in Linux?

To obtain a tree-like representation of PCI devices in Linux with the lspci command, run:

Terminal window
lspci -t

How do I show PCI devices in a specific domain with lspci in Linux?

To display PCI devices within a specific domain in Linux using the lspci command, use:

Terminal window
lspci -d <domain>

How do I show only a certain class of PCI devices with lspci in Linux?

To filter and display only a specific class of PCI devices in Linux using the lspci command, run:

Terminal window
lspci -d <vendor_id>:<device_id>

How can I list only the network devices with lspci in Linux?

To list only the network devices in Linux using the lspci command, execute:

Terminal window
lspci -nn | grep -i net

How do I show PCI devices in a specific slot with lspci in Linux?

To display PCI devices located in a specific slot in Linux using the lspci command, use:

Terminal window
lspci -s <slot>

Applications of the lspci command

  • Display information about PCI buses and devices connected to them
  • Detect hardware devices attached to the PCI bus
  • Check which drivers are being used for the devices
  • Identify the chipset used in the PCI devices
  • Troubleshoot hardware configuration issues
  • Identify device vendor and device IDs
  • Get an overview of the hardware components connected to the system