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 Ibmi Media, 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 takes the following form:
$ lsmod
This command usually displays three columns in the terminal.
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
This article covers how to list loaded kernel modules using lsmod command. In fact, lsmod command nicely prints the contents of the /proc/modules. To list the currently loaded kernel modules, execute the below command:
$ lsmod