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.

What is the lsmod command?

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.

More in This Category
Linux bg Command: Resume a Shell Job in the Background

Linux bg Command: Resume a Shell Job in the Background

Learn how to resume a Shell Job in the Background with the Linux bg command, including practical examples, key options, and important precautions.

Linux fsck Command: Check and Repair Filesystems

Linux fsck Command: Check and Repair Filesystems

Learn how to check and Repair Filesystems with the Linux fsck command, including practical examples, key options, and important precautions.

Linux zypper Command: Manage Packages on openSUSE and SUSE

Linux zypper Command: Manage Packages on openSUSE and SUSE

Learn how to manage Packages on openSUSE and SUSE with the Linux zypper command, including practical examples, key options, and important precautions.

Linux fold Command: Wrap Long Lines at a Fixed Width

Linux fold Command: Wrap Long Lines at a Fixed Width

Learn how to wrap Long Lines at a Fixed Width with the Linux fold command, including practical examples, key options, and important precautions.

Linux apropos Command: Search Commands by Description

Linux apropos Command: Search Commands by Description

Learn how to use the Linux apropos command to find relevant manual pages by searching description keywords, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux nc Command: Test TCP and UDP Connections

Linux nc Command: Test TCP and UDP Connections

Learn how to test TCP and UDP Connections with the Linux nc command, including practical examples, key options, and important precautions.

Linux column Command: Format Text as a Table

Linux column Command: Format Text as a Table

Learn how to format Text as a Table with the Linux column command, including practical examples, key options, and important precautions.

Linux w Command: Show Logged-In Users and Their Processes

Linux w Command: Show Logged-In Users and Their Processes

Learn how to show Logged-In Users and Their Processes with the Linux w command, including practical examples, key options, and important precautions.

Linux mktemp Command: Create Secure Temporary Files and Directories

Linux mktemp Command: Create Secure Temporary Files and Directories

Learn how to create unpredictable temporary files and directories with Linux mktemp, use templates and TMPDIR, clean up with trap, and avoid unsafe dry runs.

Linux pgrep Command: Find Process IDs by Name or Criteria

Linux pgrep Command: Find Process IDs by Name or Criteria

Learn how to find Process IDs by Name or Criteria with the Linux pgrep command, including practical examples, key options, and important precautions.