lspci
Overview
The lspci
command displays information about PCI buses in the system and devices connected to them. It’s essential for hardware identification and troubleshooting.
Syntax
lspci [options]
Common Options
Option | Description |
---|---|
-v |
Verbose output |
-vv |
Very verbose output |
-k |
Show kernel drivers |
-mm |
Machine-readable output |
-t |
Show bus tree |
-s [[[[<domain>]:]<bus>]:][<device>][.[<func>]] |
Show specific device |
-d [<vendor>]:[<device>] |
Show specific vendor/device |
-i <file> |
Use specified ID database |
Key Use Cases
- Hardware identification
- Driver troubleshooting
- System inventory
- Hardware compatibility checks
- Performance analysis
Examples with Explanations
Example 1: Basic Device List
lspci
Shows basic information about PCI devices
Example 2: Detailed Information
lspci -v
Shows verbose information including driver details
Example 3: Kernel Modules
lspci -k
Shows kernel modules used by each device
Understanding Output
Standard output format:
Bus:Device.Function Class: Vendor Device (Rev XX)
Example:
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
Common Usage Patterns
Check graphics card:
lspci | grep -i vga
View network interfaces:
lspci | grep -i ethernet
Check specific device details:
lspci -s 00:02.0 -v
Performance Analysis
- Minimal system impact
- Quick hardware inventory
- Driver-hardware relationship
- Resource allocation
- IRQ assignments