To display a list of modules or device drivers in the Linux kernel, you can use the lsmod
command.
lsmod
This will list all the loaded modules or device drivers in the kernel, along with their sizes and dependencies.
To display the modules or device drivers in a more human-readable format, use the modinfo
command with the name of the module or device driver as an argument:
modinfo MODULE_NAME
Replace MODULE_NAME
with the name of the module or device driver that you want to display.
For example, to display information about the e1000
module:
modinfo e1000
To display a list of all the available modules or device drivers that can be loaded into the kernel, you can use the ls
command to list the files in the /lib/modules/KERNEL_VERSION/kernel
directory:
ls /lib/modules/KERNEL_VERSION/kernel
Replace KERNEL_VERSION
with the version of the kernel that you are running.