Home > Package & System Management > lspci

lspci: Check PCI Device Information

This command displays detailed information about all devices connected to the system's PCI (Peripheral Component Interconnect) bus. It is used to check information for various hardware devices such as graphics cards, network cards, and sound cards.

Overview

lspci shows vendor, device ID, subsystem, revision, and driver information for PCI devices installed in the system. It is useful for troubleshooting hardware issues or understanding system configuration.

Key Features

  • Outputs a list of PCI devices and their detailed information
  • Identifies vendor and device IDs
  • Provides information on the kernel driver in use
  • Can filter by specific devices or IDs

Key Options

The lspci command allows you to control the output format and filter specific information using various options.

Output Format and Verbosity

Device Filtering

Generated command:

Try combining the commands.

Description:

`lspci` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

List All PCI Devices

lspci

Outputs a brief list of all PCI devices connected to the system.

Detailed Information and Kernel Driver

lspci -vk

Displays detailed information for each device along with the currently used kernel driver and module information.

Check Specific Device Information

lspci -s 00:02.0 -v

Checks information for a specific PCI device using its bus, device, and function numbers. (e.g., 00:02.0 is typically the integrated graphics card)

Filter by Vendor/Device ID

lspci -d 8086: -v

Finds and displays information for PCI devices with a specific vendor ID and device ID. (e.g., devices from Intel Corporation)

Check Graphics Card Information

lspci | grep -i vga

Checks detailed information for VGA-compatible controllers (graphics cards).

Installation

lspci is part of the `pciutils` package. It is installed by default on most Linux distributions, but if it's not present, you can install it using the following commands.

Debian/Ubuntu

sudo apt update
sudo apt install pciutils

Install using the APT package manager.

Fedora/CentOS/RHEL

sudo dnf install pciutils
# or sudo yum install pciutils

Install using the YUM or DNF package manager.

Arch Linux

sudo pacman -S pciutils

Install using the Pacman package manager.

Tips & Notes

You can efficiently identify hardware information and use it for troubleshooting by leveraging lspci.

Useful Tips

  • `lspci` can generally be run without root privileges, but some detailed information (e.g., all information with the `-vvv` option) may require `sudo`.
  • The output of `lspci` is very useful for extracting specific information by piping it (|) with other text processing commands like `grep`, `awk`, and `sed`.
  • Device IDs (e.g., `8086:0a16`) can be searched on the PCI ID Repository (pci-ids.ucw.cz) to obtain more information about the manufacturer and model of the corresponding device.

Same category commands