Seeing the Invisible Hardware
When you plug a USB flash drive into a Linux computer, it immediately mounts and appears on your desktop. But what happens when you install a complex internal hardware component, like a new Nvidia graphics card, a 10-Gigabit Ethernet network adapter, or a specialized audio capture card?
These devices connect directly to the motherboard via the Peripheral Component Interconnect Express (PCIe) bus. If you boot up Linux and your new Wi-Fi card isn’t working, your first troubleshooting step must be determining if the operating system even sees the hardware physically attached to the motherboard.
To do this, you do not need to reboot into the BIOS or open the computer case. You simply use the lspci (List PCI) command in the terminal.
Step 1: The Basic Hardware Sweep
The lspci command interrogates the internal hardware bus and returns a list of every single connected component, regardless of whether Linux actually has the drivers installed to use it.
Open your terminal and type:
lspci
The output will be a dense list of technical hardware. Each line represents a specific device.
For example, you might see:
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 62002:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
The numbers on the left (e.g., 02:00.0) are the specific bus, device, and function numbers—essentially the physical address of the component on the motherboard.
Step 2: Filtering for Specific Components
Because modern motherboards have dozens of built-in micro-controllers (USB hubs, memory controllers, thermal sensors), the raw lspci output can be overwhelming.
If you just installed a new network card and want to verify it is seated correctly, you can use the grep command to filter the list.
To find all network adapters (Wi-Fi and Ethernet):
lspci | grep -i network
lspci | grep -i ethernet
To find graphics cards and GPUs:
lspci | grep -i vga
lspci | grep -i 3d
Step 3: Extracting Deep Hardware Details
The basic lspci output gives you the manufacturer and the general model name. However, if you are trying to compile a custom driver from a GitHub repository, you often need the exact hardware revision number and subsystem ID.
You can instruct lspci to be much more verbose by adding the -v (verbose) flag. For maximum detail, use two -vv flags.
(Note: Because extracting deep hardware capabilities requires elevated permissions, you should run verbose mode as root using sudo).
sudo lspci -vv
This will dump hundreds of lines of data. It is much easier to combine this with the specific physical address (the bus number) of the device you want to investigate.
If your Wi-Fi card is at address 02:00.0, you can query only that specific card using the -s (slot) flag:
sudo lspci -s 02:00.0 -vv
Step 4: Finding the Kernel Driver
The most common reason for using lspci is driver troubleshooting. You see the hardware is physically connected, but you need to know if the Linux kernel has actually loaded a driver module to operate it.
You can use the -k (kernel) flag to display the specific driver currently assigned to each piece of hardware.
lspci -k
Underneath each device, you will see two critical lines:
Kernel driver in use: iwlwifi(This means the driver is successfully loaded and running the hardware).Kernel modules: iwlwifi(This lists the drivers available on the system that could run the hardware).
If a device shows a Kernel Module available, but does not show a Kernel Driver in Use, the hardware is not functioning, and you know exactly which driver module you need to manually load using modprobe.