The lsmod command is used to display loaded kernel modules. Kernel modules are code snippets that can be loaded or unloaded to the kernel on demand. If you want to load modules, you can use the modprobe command. The modules are fully listed in /etc/modules-load.d/<program>.conf file.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux System command queries.
In this context, we shall look into how to list loaded kernel modules using lsmod command.
lsmod command syntax
lsmod command takes the following form:
This command usually displays three columns in the terminal.
- 1st column: the names of loaded modules.
- 2nd column: the memory capacity of each module.
- 3rd column: the total number of uses and optionally the name of the module.
You can use another way to search a specific module by the grep command. For example, we wanted to search a module named "xor":
$ lsmod | grep xor
To get more information about kernel modules, we will use the modinfo command. For example:
$ sudo modinfo xor
[Need assistance in searching for Installed Linux system packages? We can help you. ]