What does lsmod command do in Linux?

ww‮.w‬lautturi.com
What does lsmod command do in Linux?

The lsmod command is a command-line utility in Linux that displays information about the currently loaded kernel modules. A kernel module is a piece of code that can be loaded or unloaded into the kernel of an operating system to extend its functionality.

The lsmod command displays a list of all the kernel modules that are currently loaded into the kernel, along with their size, dependencies, and other information.

To use the lsmod command, you can simply run it in a terminal with no arguments, like this:

lsmod

This will display a list of all the currently loaded kernel modules, along with their sizes and other information.

You can also use the -t option to sort the kernel modules by the number of times they are used, or the -n option to display the module names only.

For example, to display the module names only, sorted by the number of times they are used, you can use the following command:

lsmod -t -n

You can find more information about the lsmod command and its options in the lsmod man page by running man lsmod in a terminal.

Created Time:2017-10-30 14:27:32  Author:lautturi