Lspci command on Linux (shows PCI devices)
During the system load process, the Kernel detects the PCI devices connected to the micro. The list of expansion cards found can be read using the lspci command.
The lspci Command in Linux is useful for showing all the information about the system’s PCI buses and the devices connected to them.
Your most common options are:
- -v Shows detailed information about all devices.
- -vv shows even more information about the devices.
- -n Shows the codes of the manufacturers and devices.
- -x. Shows the first 64 bytes of the PCI configuration in hexadecimal.
- -xxx Shows the entire PCI configuration in hexadecimal.
Example of use:
Models that use the PCI bus most of the time dispense with the manual configuration of the resources expended.
You can check the addressing and interruption of the devices by consulting the contents of the /proc/interrupts and /proc/ioports files.
To check the entry and exit ports:
Thus, to enable the hardware, the kernel module corresponding to the device must be loaded. To load the module, you must use the modprobe command followed by the module name:
Some non-PCI cards require I/O addressing and IRQ to be entered as arguments for the modprobe command to allocate resources correctly:
Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.
Did you like it?
Share