When you are troubleshooting hardware drivers on a Linux machine, one of the first things you need to know is exactly what physical hardware is connected to your motherboard. The Peripheral Component Interconnect (PCI) bus is the primary interface used to attach hardware devices in a computer, including your graphics card (GPU), network adapters, audio controllers, and USB host controllers.
In Ubuntu, you do not need to open up your computer case to see what is installed. You can use the powerful lspci command to instantly list all the devices connected to your system’s PCI buses, along with detailed vendor information and driver statuses.
This guide explains how to use the lspci command in the Ubuntu terminal to identify your hardware.
Step 1: The Basic lspci Command
The standard command without any flags will provide a clean, readable list of every PCI device on your system.
- Open your Ubuntu terminal.
- Type the following command and press Enter:
lspci - The terminal will output a list. The first column (e.g.,
00:1f.3) is the hardware slot address. This is followed by the class of the device (e.g., “Audio device” or “VGA compatible controller”) and finally the specific vendor and model name (e.g., “Intel Corporation Tiger Lake-LP Smart Sound Technology”).
Step 2: Viewing Detailed Hardware Information
If you need to know exactly which kernel driver is currently managing a specific piece of hardware, or if you need to see the specific subsystem IDs for advanced troubleshooting, you can increase the verbosity of the command.
- To view detailed information, use the
-v(verbose) flag:lspci -v - Because this outputs a massive amount of text, it is highly recommended to pipe the output into the
lesscommand so you can scroll through it page by page:lspci -v | less - Use your arrow keys to scroll up and down. Press Q to exit the viewer when you are done.
In the verbose output, look for the lines starting with Kernel driver in use: and Kernel modules: to identify exactly how Ubuntu is interfacing with that hardware component.
Step 3: Finding a Specific Device (Filtering)
If you only want to know the exact model of your graphics card, you do not need to read through the entire list. You can use the grep command to filter the output for specific keywords.
- To find your graphics card (GPU), use the keyword “VGA” or “3D”:
lspci | grep -i vga - To find your Wi-Fi or Ethernet network adapters, use the keyword “Network” or “Ethernet”:
lspci | grep -i network
Note: The -i flag makes the grep search case-insensitive.