Linux find out what kernel drivers (modules) are loaded with lsmod command

https:/‮ww/‬w.lautturi.com
Linux find out what kernel drivers (modules) are loaded with lsmod command

To find out which kernel drivers (also known as modules) are loaded on a Linux machine, you can use the lsmod command. This command displays a list of the loaded kernel modules, along with their dependencies and sizes.

To use the lsmod command, simply run it without any arguments:

lsmod

This will print a list of the loaded kernel modules, with one module per line. The output will include the following columns:

  • Module: The name of the kernel module.
  • Size: The size of the kernel module in memory.
  • Used by: The number of other kernel modules or processes that depend on this kernel module.
  • Depends on: The names of the kernel modules that this kernel module depends on.

For example, the output of the lsmod command might look something like this:

Module                  Size  Used by
vboxdrv                778240  2
vboxnetadp             25600  0
vboxnetflt             28672  0
vboxpci                24576  0
ip6table_filter        16384  1
ip6_tables             32768  1 ip6table_filter
x_tables               49152  4 ip6table_filter,ip6_tables,iptable_filter,ipt_REJECT
iptable_filter         16384  1
ipt_REJECT             16384  1

You can also use the modprobe command to view information about specific kernel modules. This command allows you to manipulate the kernel module load list, including loading, unloading, and querying the status of kernel modules.

To view information about a specific kernel module using modprobe, you can use the following command:

modprobe -V <module>

Replace <module> with the name of the kernel module you want to view. This will print detailed information about the kernel module, including its dependencies, parameters, and other information.

Note that the specific command and options for viewing loaded kernel modules may vary depending on your Linux distribution and the tools it provides. Consult the documentation for your specific distribution for more information.

Created Time:2017-10-30 10:17:40  Author:lautturi