• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How Do I Check What PCI Devices Are Connected On My Linux System?

CJ Saathoff

Published on: September 9, 2024

Categories: Linux Command Line 0

Have you ever encountered a time when you worked in a remote Linux server and needed to check what was connected to the system’s local PCI Express and PCI buses? To determine what PCI devices are connected one of the simplest ways to do this is using the lspci command.

Table of Contents
  • Introduction
  • Basic Syntax
    • Results Explained
      • What Is The Bus ID?
      • What Is The Device Class?
      • What Is The Revision Number?
  • Flags
  • Formatting For Parsing
  • Conclusion
  • Additional Links

Introduction

The lspci command on Linux is a utility that lists the PCI devices connected to a system. The lspci command comes pre-installed on almost all Linux distributions, so you shouldn’t need to worry about installing it. However, if you run into an edge case the package you want to look is pciutils. In this post we will dig into the syntax, what the results mean, and other flags you may find useful.

Basic Syntax

The simplest syntax of the lspci command is:

lspci

All instances of the command will follow the following syntax:

lspci [options]

Troubleshooting Note: If you receive a permissions denied error when trying to run the lspci command, try again using sudo or a user with elevated privileges.

Results Explained

00:00.0 Host bridge: Intel Corporation 440FX – 82441FX PMC [Natoma] (rev 02)

00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]

00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]

00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)

00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)

00:02.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 05)

00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon

00:05.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge

00:07.0 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)

00:09.0 Communication controller: Red Hat, Inc. Virtio console

00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device

00:1e.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge

00:1f.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge

01:01.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI

Let’s break one of these down by section:

00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device

  1. The bus ID
  2. The device class
  3. The Vendor and device information
  4. In some cases a revision number may be included

What Is The Bus ID?

Indicates how the device is connected to the system, this consists of the PCI bus, the slot, and the function. The function is relevant for devices that do more than a single thing for example a dual port Ethernet card.

What Is The Device Class?

The device class indicates the type of device by its function.

What Is The Revision Number?

This indicates the revision or iteration of the device.

Flags

Below are some of the flags I believe you will find most useful.

-t Show a tree-like diagram of the buses, bridges, and devices.

-v Be verbose and display detailed information about all devices.

-vv Be very verbose and display more details. This level includes everything deemed useful.

-vvv Be even more verbose and display everything.

-k Show kernel drivers handling each device and also kernel modules capable of handling it. Turned on by default when -v is given in the normal mode of output.

-b Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the PCI bus instead of as seen by the kernel.

-D Always show PCI domain numbers. By default, lspci suppresses them on machines that have only domain 0.

-P Identify PCI devices by path through each bridge, instead of by bus number.

-PP Identify PCI devices by path through each bridge, showing the bus number as well as the device number.

-n Show PCI vendor and device codes as numbers instead of looking them up in the PCI ID list.

-nn Show PCI vendor and device codes as both numbers and names.

-Q Query the central database even for entries that are recognized locally. Use this if you suspect that the displayed entry is wrong.

-M Invoke bus mapping mode which performs a thorough scan of all PCI devices, including those behind misconfigured bridges, etc. This option gives meaningful results only with a direct hardware access mode, which usually requires root privileges.

–version Shows lspci version.

The above list is not exhaustive, for a full list check out an online man page or check your local man page by running man lspci.

Formatting For Parsing

In addition to the above flags if you’re looking to use the output of the lspci command in a script or another pragmatic fashion it is recommended you use one of the sets of flags below:

-m Dump PCI device data in a backward-compatible machine-readable form.

-mm Dump PCI device data in a machine-readable form for easy parsing by scripts.

-vm In this mode, lspci tries to be perfectly compatible with its old versions. It’s almost the same as the regular verbose format, but the Device tag is used for both the slot and the device name, so it occurs twice in a single record. Please avoid using this format in any new code.

-vmm The verbose output is a sequence of records separated by blank lines. Each record describes a single device by a sequence of lines, each line containing a single ‘tag: value’ pair. The tag and the value are separated by a single tab character. Neither the records nor the lines within a record are in any particular order. Tags are case-sensitive.

Conclusion

In this post we answer the question of how do I list connected PCI devices. The lspci command is the perfect command to answer this question. From basic usage, what the results mean, flags you may find useful, and flags recommend for scripts/programs.

Additional Links

Are you done reading and looking for more, why not check these links out?

  • The lsusb command
  • Scripting Posts
CJ Saathoff

Embracing a lifelong passion for technology since childhood, CJ delved into the intricate workings of systems, captivated by the desire to understand the unknown. This innate curiosity led to his discovery of Linux, a revelation that resonated deeply. With more than 7 years of on the job experience, he’s honed his technical skills as a Geek and Senior Linux Systems Administrator.

Related Posts

All About Bash Parameter Expansion

Parameter expansion in bash is very useful when working with strings like filenames and log entries. It allows you to clean up text.

Curl Headers, Cookies, and Authentication

You can do a lot more with curl, than just sending requests. Here's how to change the headers, the cookies, and how to authenticate users.

Curl vs Wget: Choosing the Right Tool for the Job

Linux has two popular tools for getting data from third party websites. Here's the difference between curl and wget.

Git Rebase vs Merge vs Cherry-Pick: When to Use Each

Git has many tools for merging branches and commits. Rebasing, merging, and cherry-picking all have their uses.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA