System and processes

The lspci command

Lists the devices connected to the motherboard PCI bus: graphics cards, network, audio and disk controllers. It is the first command to find out which hardware you have and which driver uses it. Many graphics and network problems are diagnosed from its output.

Syntax

lspci [opciones]Try it in the terminal →

Most useful options

-kShows the kernel driver in use and the modules that can load it
-nnAdds the numeric vendor:device IDs, useful when looking for drivers
-s DIRECCIÓNShows only one device by its address, for example 00:02.0
-vVerbose output: capabilities, IRQ, memory and links. Without root some fields are incomplete

Copy-ready examples

$ lspci | grep -i vgafinds the graphics card without reading the whole list.

Example output

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
$ lspci -k -s 00:02.0shows which driver that specific device uses.

Example output

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
	Subsystem: Lenovo UHD Graphics 620
	Kernel driver in use: i915
	Kernel modules: i915
$ lspci -nn | grep -i networkgets the network adapter identifier to look up its driver.

Example output

02:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)

You can try them in the browser terminal: it does not touch your computer.

Common errors

MessageCauseFix
No error messageWithout root rights, lspci -v does not show some fields and names may come out incomplete.Run the command again with sudo if you need all the data.
No error messageThe address given with -s does not exist on this machine.List first with lspci and copy the exact address.
bash: lspci: command not foundThe command is not installed. It comes in the pciutils package.Install it with your package manager, for example sudo apt install pciutils.

Typical mistakes

  • Vendor and model names come from a database (pci.ids). If the model is very recent, it may show as unknown.
  • A device connected through USB does not appear here, even if it is a card or adapter plugged into a USB port.
  • Addresses such as 00:02.0 depend on the board. They change if you change the board or the slot.
  • Without root the output can be incomplete: a missing field does not mean the hardware is missing.

Differences from similar commands

  • lsusb: lists the devices on the USB bus, not the ones attached to the board through PCI.
  • lscpu: shows the processor in detail. lspci focuses on peripherals and controllers.
  • lsblk: lists disks and partitions. The disk controller shows up in lspci, but the volumes do not.

Related commands

FAQ

How do I know which driver my graphics card uses?

Run lspci -k | grep -A3 VGA. The Kernel driver in use line shows the active driver.

Why doesn't lspci show my USB Wi-Fi adapter?

Because it connects through USB, not PCI. Use lsusb to see it.

What does rev 07 mean?

It is the silicon revision set by the manufacturer. It helps look up drivers or errata for a specific model.

More System and processes commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course