Linux lsmod Command: List Loaded Kernel Modules

lsmod displays the list of modules currently loaded in the Linux kernel, along with their size and usage relationships. It is used to check whether drivers or kernel features are loaded as modules.

The output is a neatly organized view of the information in /proc/modules. Module is the name, Size is the module size, and Used by shows the usage count and related modules. Features directly incorporated into the kernel may not appear in the module list.

Basic syntax

lsmod [option]

Installed implementations and options may vary depending on the distribution. Check the description for your current system with man lsmod.

Examples

Checking the module list

Check the currently loaded modules and their usage relationships.

lsmod

Finding a specific module

Search the list to see if its name appears.

lsmod | grep '^overlay '

Go to module details

Use the name checked in the list to look at file and parameter information.

modinfo overlay

Reading columns of the loaded module list

lsmod only shows modules currently loaded into the kernel. In the result, Size indicates the module size, and Used by shows reference relationships.

lsmod | head

Structure of example output (module names and numbers may vary):

Module                  Size  Used by
nf_conntrack           123456  1

Do not assume that just because a module is not listed, the kernel does not support that functionality. The feature may be built into the kernel or the module may not yet be loaded because it is not needed. To view the description and file information of a specific module, use modinfo module_name.

Main Options and Format

Options/Format Description
-s Send error messages to syslog.
-v Display diagnostic messages in detail.
-V Show the kmod tool version.
-h Show help.

Precautions when using

Do not conclude that a function does not exist just because it is not in the list. The function may be built into the kernel, or the module name may be different from expected. Actually loading or removing a module is done by a separate management command, not lsmod, and it affects the system.

Frequently Asked Questions

If a driver does not appear in lsmod, does that mean it cannot be used?

Not necessarily. It may be built into the kernel or provided as a module under a different name.

Official Documentation

The exact behavior of the option and implementation-specific differences can be found in the official documentation related to lsmod.