lspci

Linux · System · reference only

What it does

Lists the devices connected to the PCI bus: graphics card, network, disk controllers, and so on.

Syntax

lspci [opciones]

Options and parameters

  • -v

    Shows detailed information for each device.

  • -k

    Shows the kernel driver each device uses.

  • -nn

    Shows numeric IDs next to the names.

  • -s ranura

    Shows only the device in that slot, for example 00:02.0.

  • -t

    Shows the devices as a tree.

  • -d fabricante:modelo

    Shows only the devices with those IDs.

Usage examples

  • lspci

    Lists all PCI devices.

  • lspci -k

    Shows which driver each device uses, useful when something does not work.

  • lspci -nn | grep -i vga

    Looks for the graphics card with its IDs.

  • lspci -s 00:02.0 -v

    Shows the details of one specific device.

Notes and common mistakes

  • It belongs to the pciutils package.
  • With sudo it shows more detail on some devices.

Related commands