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.
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 incompleteCopy-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
| Message | Cause | Fix |
|---|---|---|
| No error message | Without 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 message | The address given with -s does not exist on this machine. | List first with lspci and copy the exact address. |
| bash: lspci: command not found | The 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
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.
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