Inventory PCI, USB, and block devices using standard CLI tooling, then map a target PCI device to its bound kernel driver. Confirm the driver module state using module inspection paths.
You need a quick, reliable hardware inventory baseline for a Linux host. Enumerate PCI and USB devices, inspect block devices and mount points, then pick a PCI device and prove which kernel driver is bound to it and whether that driver module is loaded.
Establish this baseline before deeper debugging. You cannot troubleshoot drivers, storage, or connectivity if you do not first confirm what the kernel can actually see.
lspci -nn
.
lspci -k
output.
lsusb
for USB buses and devices.
lsblk
before you touch storage.
lsmod
and kernel-provided module state (
/proc/modules
).
lspci -nn
Numeric IDs provide stable identification across vendors and distributions. Use them when correlating devices with driver support matrices or kernel module names.
00:03.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet [8086:100e]
lspci -nnk
This reveals the binding state.
Kernel driver in use
is the runtime driver.
Kernel modules
lists candidate modules that could handle the device.
Kernel driver in use: e1000
Kernel modules: e1000
Pick one PCI device line from your output and use that
driver/module name in Step 5. The example uses
e1000
as the module name.
lsusb
USB inventory helps validate keyboards, storage adapters, wireless receivers, and other peripherals that may not show up in PCI output.
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
lsblk -o NAME,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINTS
lsblk
provides a clean view of disks, partitions, and mount
points. Confirm what is mounted and where before you touch
storage.
sda
├─sda1 /boot
└─sda2 /
lsmod | grep -E '^e1000(\s|$)'
This confirms the module is loaded in the running kernel. If the module is not present, it may be built-in, blacklisted, missing, or not bound to the device.
e1000 155648 0
grep e1000 /proc/modules
/proc/modules
is a direct view of loaded modules (name, size, use count).
It can be useful in minimal environments and scripting
contexts.
If devices are missing, validate BIOS/UEFI settings, passthrough mappings (virtualization), and that the host is seeing the bus at all. Hardware and platform configuration issues must be resolved before driver debugging.
The device is present but unbound. Confirm candidate modules
from
Kernel modules
output, then check kernel logs for probe or binding errors.
Some drivers are built into the kernel and will not appear
in
lsmod
. Cross-check with
/proc/modules
and confirm binding again with
lspci -k
for the target device.
If storage is missing or mount points are unexpected,
validate with multiple views. Confirm device nodes exist
under
/dev
and check recent kernel messages for hotplug or bus resets.
This lab is read-only. Your cleanup is capturing output for documentation or escalation and leaving the host unchanged.
lspci -nn
lspci -nnk
lsusb
lsblk -o NAME,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINTS
lsmod | head
You can name the target device by vendor:device ID, identify the bound kernel driver, and show module state without guessing.
lspci -nn
: Lists PCI devices and includes numeric vendor and device
IDs.
-n
: Displays numeric IDs (often used twice as
-nn
to show both text and numeric IDs).
lspci -nnk
: Shows kernel driver binding and candidate modules.
-k
: Displays the kernel driver currently bound to each
device.
lsusb
: Lists USB buses and attached devices.
lsblk -o <cols>
: Lists block devices with selected columns.
MOUNTPOINTS
: Shows all mount points associated with a device.
lsmod
: Lists currently loaded kernel modules.
/proc/modules
: Kernel-exported view of loaded modules (name, size, use
count).
grep <pattern> <file>
: Filters lines that match a pattern.
<pattern>
: The string or regex you are matching (for example
e1000
).
<file>
: The file to search (for example
/proc/modules
).