When you plug a new expansion card—such as a dedicated GPU, a 10Gbps network interface card, or a hardware RAID controller—into the PCIe slot of your Linux motherboard, the operating system must instantly recognize the silicon and assign the correct kernel driver. If the new hardware is failing to initialize, your first troubleshooting step must be to verify that the motherboard is physically communicating with the card. You can instantly map every single device connected to the Peripheral Component Interconnect (PCI) bus by using the lspci command.
How to List All Connected PCI Devices
The lspci utility is part of the pciutils package, which is installed by default on almost every modern Linux distribution. It does not require sudo privileges for basic queries.
Open your terminal and run:
lspci
The output will be a list of every integrated and discrete hardware component connected to the PCI bus. The first column (e.g., 00:1f.2) is the exact physical slot address on the motherboard. The remaining text identifies the hardware class (e.g., VGA compatible controller, Ethernet controller) and the specific manufacturer and model name.
If you plugged a new Nvidia GPU into your server, and you do not see an Nvidia entry in this list, the issue is not a software driver problem; the card is either physically broken, not receiving enough power from the PSU, or improperly seated in the motherboard slot.
How to Identify the Assigned Kernel Driver
If you see your new hardware in the list, but it is still not functioning, the Linux kernel might have loaded the wrong driver, or it might have failed to load a driver entirely.
You can force lspci to reveal the exact kernel module currently assigned to each piece of hardware by using the -k (kernel) flag:
lspci -k
Underneath each hardware entry, you will see two new lines:
- Kernel driver in use: The specific driver actively controlling the hardware right now (e.g.,
nouveaufor an open-source Nvidia driver). - Kernel modules: A list of alternative drivers installed on the system that are technically compatible with this hardware, should you choose to switch them.
How to Filter the Output for Specific Hardware
If you are managing a massive enterprise server with dozens of connected PCI devices, the default output is overwhelming. You can filter the list to only show specific classes of hardware using the grep command.
- To view only the graphics cards (GPUs), run:
lspci | grep -i vga(orgrep -i 3dfor headless accelerators). - To view only the network interface cards (NICs), run:
lspci | grep -i net.