Skip to content

lspci

lspci is a utility for displaying information about PCI buses in the system and devices connected to them


List hardware

lscpi

List hardware data

lspci -nnk

Show kernel drivers handling each device

lspci -k

Show numeric ID's

lspci -n

Show VGA controller we got installed

lspci | grep -i VGA

What GPU is used

lspci -nnk | sed -n '/VGA\|Display\|3D controller/,+4p'

Show builtin modules only

lspci -nnk | awk -F': ' '/Kernel modules:/ { print $2 }' | tr ' ' '\n' | sort -u

Another example to see what builtin kernel modules are used

lspci -nnk | sed -n 's/.*Kernel modules: //p' | tr ' ' '\n' | sort -u

Show what each builtin module belongs to

lspci -nnk | awk '
/^[0-9a-f]{2}:/ { dev=$0 }
/Kernel modules:/ { print dev "\n  -> " $0 "\n" }
'

Get information on your graphics card on linux (such as graphics memory size)

lspci -v -s `lspci | awk '/VGA/{print $1}'`

Show detailed information for a single PCI device

lspci -nnvvv -s 00:14.2

Show both textual and numeric ID's (names & numbers)

lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:191f] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
00:1f.0 ISA bridge [0601]: Intel Corporation 200 Series PCH LPC Controller (Q270) [8086:a2c6]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (5) I219-LM [8086:15e3]

Show detailed info about hardware (example)

$ lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:191f] (rev 07)
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: skl_uncore
        Kernel modules: ie31200_edac
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
        DeviceName: Onboard IGD
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: i915
        Kernel modules: i915
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: ahci
        Kernel modules: ahci
00:1f.0 ISA bridge [0601]: Intel Corporation 200 Series PCH LPC Controller (Q270) [8086:a2c6]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (5) I219-LM [8086:15e3]
        DeviceName: Onboard Lan
        Subsystem: Hewlett-Packard Company Device [103c:829a]
        Kernel driver in use: e1000e
        Kernel modules: e1000e

List all PCI (Peripheral Component Interconnect) devices

lspci | egrep -i --color 'network|ethernet'

List vga and 3d info about graphic card

lspci -k | grep --color=always -A 2 -E "(VGA|3D)"