Linux lsmod command

Updated: 04/26/2017 by Computer Hope

About lsmod

lsmod shows (or "lists") the status of modules in the Linux kernel.

Overview

Linux kernel modules (LKMs) are pieces of code which can be loaded into the kernel much like a hot-swappable piece of hardware: they can be inserted into the kernel and activated without the system needing to be rebooted.

lsmod is a very simple program with no options: it nicely formats the contents of the file /proc/modules, which contains information about the status of all currently-loaded LKMs.

lsmod syntax

lsmod

lsmod examples

To list all active kernel modules, simply run lsmod at the command line:

lsmod

This is essentially the same as running "cat /proc/modules", but the information is formatted a little nicer. You'll see three columns of information:

  • Module: the name of the module. This is usually the name of the module file, minus the extension (.o or .ko), but it may have a custom name, which can be specified as an option when the module is inserted with the insmod command.
  • Size: the amount of memory used by the resident module, in bytes.
  • Used by: This column contains a number representing how many instances of the module are being used. If the number is zero, the module is not currently being used. Text after the number represents any available information about what is using the module: this is commonly a device name, a filesystem identifier, or the name of another module.

Output of lsmod will resemble the following:

Module                  Size  Used by
fuse                   52176  3 
cryptd                 14125  0 
aes_i586               16647  2 
aes_generic            32970  1 aes_i586
parport_pc             22036  0 
ppdev                  12651  0 
lp                     12797  0 
parport                31254  3 lp,ppdev,parport_pc
bnep                   17288  2 
rfcomm                 28626  0 
bluetooth             103791  10 rfcomm,bnep
cpufreq_conservative   12987  0 
cpufreq_stats          12762  0 
cpufreq_powersave      12422  0 
cpufreq_userspace      12520  0 
loop                   17810  0 
uvcvideo               56896  0 
videodev               61658  1 uvcvideo
media                  13692  2 videodev,uvcvideo
snd_hda_codec_realtek  142267 1 
arc4                   12418  2 
joydev                 17010  0 
ath9k                  58983  0 
snd_hda_intel          21786  2 
ath9k_common           12648  1 ath9k
snd_hda_codec          63477  2 snd_hda_intel,snd_hda_codec_realtek
ath9k_hw              311433  2 ath9k_common,ath9k
i915                  321557  3 
drm_kms_helper         22738  1 i915
drm                   146387  4 drm_kms_helper,i915
i2c_algo_bit           12713  1 i915
snd_hwdep              12943  1 snd_hda_codec
snd_pcm                53461  2 snd_hda_codec,snd_hda_intel
snd_page_alloc         12867  2 snd_pcm,snd_hda_intel
ath                    17114  3 ath9k_hw,ath9k_common,ath9k
mac80211              171389  1 ath9k
acer_wmi               21651  0 
sparse_keymap          12680  1 acer_wmi
iTCO_wdt               16945  0 
acpi_cpufreq           12807  1 
snd_seq                39512  0 
snd_seq_device         13016  1 snd_seq
snd_timer              22356  2 snd_seq,snd_pcm
snd                    42761  12 snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek
coretemp               12770  0 
cfg80211              113445  3 mac80211,ath,ath9k
rts_pstor             226667  0 
rfkill                 18516  5 cfg80211,acer_wmi,bluetooth
iTCO_vendor_support    12632  1 iTCO_wdt
i2c_i801               12670  0 
psmouse                59609  0 
i2c_core               19116  6 i2c_i801,i2c_algo_bit,drm,drm_kms_helper,i915,videodev
pcspkr                 12515  0 
soundcore              12921  1 snd
mperf                  12421  1 acpi_cpufreq
evdev                  17225  10 
serio_raw              12803  0 
ac                     12552  0 
processor              27565  1 acpi_cpufreq
video                  17459  1 i915
battery                12986  0 
power_supply           13283  2 battery,ac
wmi                    13051  1 acer_wmi
button                 12817  1 i915
ext4                  306996  2 
crc16                  12327  2 ext4,bluetooth
jbd2                   56426  1 ext4
mbcache                12938  1 ext4
microcode              17558  0 
hid_logitech_dj        13049  0 
usbhid                 31554  1 hid_logitech_dj
hid                    64284  2 usbhid,hid_logitech_dj
sg                     21476  0 
sd_mod                 35425  4 
crc_t10dif             12332  1 sd_mod
thermal                13103  0 
thermal_sys            17752  3 thermal,video,processor
uhci_hcd               22337  0 
ahci                   24917  3 
libahci                18373  1 ahci
libata                125014  2 libahci,ahci
ehci_hcd               39631  0 
usbcore               104555  5 ehci_hcd,uhci_hcd,usbhid,uvcvideo
scsi_mod              135081  4 libata,sd_mod,sg,rts_pstor
r8169                  41830  0 
mii                    12595  1 r8169
usb_common             12338  1 usbcore

depmod — Generate a list of kernel module dependencies and associated map files.
insmod — Insert a module into the Linux kernel.
modinfo — Show information about a Linux kernel module.
modprobe — Add and remove modules from the Linux kernel.
rmmod — Remove a module from the Linux kernel.