Inspect PCI devices and the kernel driver currently in use or available for each.
Use a pciutils command.
Which command is appropriate?
lspci -k displays Kernel driver in use and Kernel modules for PCI devices.
Detailed explanation
lspci -tIncorrect. -t displays the PCI bus topology, not driver associations.
Incorrect. -t displays the PCI bus topology, not driver associations.
lspci -kCorrect. -k prints the driver in use and available kernel modules.
Correct. -k prints the driver in use and available kernel modules.
lsusb -tIncorrect. lsusb operates on USB devices.
Incorrect. lsusb operates on USB devices.
lsmod -kIncorrect. lsmod lists loaded modules and does not accept -k for PCI associations.
Incorrect. lsmod lists loaded modules and does not accept -k for PCI associations.
Try it yourself
An example you can run in a temporary verification environment.
lspci -kExpected result
PCIデバイス行とKernel driver in use/Kernel modules行(搭載機器により異なる)Key points
- lspci enumerates PCI devices
- -k shows kernel drivers
- -t shows the bus tree
Notes
- Environment: Linux / pciutils 3.x
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.