How to use the command lsmod (with examples)
- Linux
- December 25, 2023
The lsmod
command is used to display the status of Linux kernel modules. It allows you to see which kernel modules are currently loaded in your system. This can be useful for troubleshooting, checking the status of installed modules, and identifying conflicting modules.
Use case 1: List all currently loaded kernel modules
Code:
lsmod
Motivation:
- This use case is useful when you need to quickly check the loaded kernel modules on your system. It can help you identify which modules are currently active and running.
Explanation:
- The
lsmod
command has no arguments. When it is run without any arguments, it will display a list of all currently loaded kernel modules.
Example output:
Module Size Used by
nls_utf8 16384 1
isofs 40960 1
uas 28672 0
usb_storage 77824 2 uas
crc32c_generic 16384 0
crc32c_intel 24576 0
ext4 790528 1
mbcache 16384 1 ext4
jbd2 139264 1 ext4
crc16 16384 1 ext4
...
Conclusion:
- The
lsmod
command is a simple yet powerful tool for inspecting the status of loaded kernel modules. It provides a quick overview of the modules currently active on your system.