Linux lsmod Command
Linux lsmod
Command
lsmod
stands for List Modules. This command lists all currently loaded kernel modules (drivers or system components) in the Linux kernel. It helps users inspect which modules are active, their memory usage, and dependencies.
Syntax
The general syntax of the command is as follows:
$ lsmod
Run the command with no arguments:
- Module: Name of the loaded kernel module.
- Size: Memory used by the module (in bytes).
- Used by: Number of processes or modules depending on it.
Sample Output
Module Size Used by
ext4 987654 1
usb_storage 123456 0
...
Use Cases
- Check if a hardware driver (e.g., Wi-Fi, USB) is loaded.
- Troubleshoot issues caused by missing or conflicting modules.
- View dependencies between modules.
Related Commands
modprobe
: Load or unload modules.rmmod
: Remove a module from the kernel.insmod
: Insert a module into the kernel.