Linux Command: lspci
List all PCI devices
lspci lists all PCI devices in the system including graphics cards, network adapters, storage controllers, USB controllers, and sound cards. PCI is the main bus connecting hardware components. lspci is essential for identifying hardware, finding correct drivers, and troubleshooting device detection issues. The -v flags provide increasing levels of detail about each device. lspci reads from the PCI configuration space, showing vendor, device, subsystem, driver, and hardware capabilities.
Syntax
lspci [OPTION]...Key Options
-vโ Verbose โ show detailed info-vvโ Very verbose-nnโ Show vendor/device IDs-kโ Show kernel driver in use-sโ Show specific device by slot-dโ Show devices by vendor:device ID
Examples
List all PCI devices
lspciOutput: 00:00.0 Host bridge: Intel Corporation
00:02.0 VGA compatible controller: NVIDIA
00:1f.2 SATA controller: Intel
Show with drivers
lspci -kShow with IDs
lspci -nnOutput: 00:02.0 VGA [0300]: NVIDIA [10de:2504]
Pro Tips
- lspci -nn shows vendor:device IDs in brackets. Search these online to find the correct Linux driver.
- lspci -k shows "Kernel driver in use:" for each device. If missing, the driver is not loaded.
- If devices show as "Unknown", update the PCI ID database: sudo update-pciids.
Learn more: Full lspci reference โ
Related Resources