lsmod Command: Tutorial & Examples
List loaded kernel modules
lsmod command in Linux is used to list the currently loaded kernel modules in the Linux kernel. This command displays the name of the module, the size of the module in
memory, and any other modules that depend on it.
To list all the currently loaded modules, use the command
lsmod without any parameters.
lsmod command reads the
/proc/modules file, which contains a list of all the modules that are currently loaded in the kernel. The output can be
used to check if a specific module is currently loaded, or to see if there are any modules that are not being used and can be unloaded using the
It's worth noting that some modules are automatically loaded by the kernel when the system boots up or when certain hardware is detected, so it may be necessary to look into system configuration and init scripts to understand why certain modules are loaded.