Forrest logo
back to the lsmod tool

lsmod:tldr:e44d1

lsmod: List all currently loaded kernel modules.
$ lsmod
try on your machine

The "lsmod" command is used in Linux and Unix-like operating systems to list all the currently loaded kernel modules on the system.

A kernel module, also known as a device driver, is a small piece of code that allows the kernel to communicate with and control specific hardware devices or provide additional functionality to the operating system. Modules can be loaded and unloaded dynamically, without the need to reboot the system.

When you run the "lsmod" command, it displays a table showing the module names, their sizes, and the number of kernel objects depending on each module. This information helps you identify which modules are currently in use and allows you to troubleshoot or gather information about the kernel modules on your system.

The output of the "lsmod" command typically includes the module name, the size of the module in memory, the count of references to the module, and a list of other modules that depend on it (if any). For example:

Module Size Used by
nvidia 14387200 0
snd_hda_codec_hdmi 61440 1
snd_hda_codec_realtek 126976 1
snd_hda_intel 40960 0
snd_intel_dspcfg 24576 1 snd_hda_intel
snd_hda_codec 131072 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel

In this example, you can see that the "nvidia" module is loaded and being used. Other modules such as "snd_hda_codec_hdmi" and "snd_hda_codec_realtek" are also loaded and depend on the "snd_hda_codec" module.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lsmod tool