• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

Lsmod Command in Linux (List Kernel Modules)

Written by Admin, Updated On May 31, 2020
kernel, lsmod, terminal
lsmod command in linux

lsmod command is used to display the information of loaded modules in the Linux kernel. Linux kernel modules are system-level software that can be used directly by operating system kernel.

Kernel modules#

The Linux kernel is the core component of Linux operating systems. It manages the system’s resources, and communication between your computer’s hardware and software.

lsmod Command#

lsmod is a simple utility and has no options. It formats the contents of the file /proc/modules, which contains information about the status of all currently-loaded LKMs.

Run lsmod at the command line to find out what kernel modules are currently loaded:

lsmod

The command outputs information for each loaded kernel module on a new line:

Module Size Used by
cmac 16384 0
rfcomm 81920 4
...
ahci 40960 1
intel_lpss_pci 20480 0
i2c_i801 32768 0
libahci 32768 1 ahci
intel_lpss 16384 1 intel_lpss_pci
...

There are three columns in each row:

  • Module – It displays the name of the module.
  • Size – The second column shows the size of the module in bytes.
  • Used by – This column shows a number that indicates how many instances of the module are currently used. Zero value means module is not used.

You can filter the output using grep, to find out a specific module is loaded or not. For example to find whether the kvm module is loaded you would run:

lsmod | grep kvm
kvm_intel             217088  0
kvm                   610304  1 kvm_intel
irqbypass              16384  1 kvm

You can get the more information about a module, issue the modinfo command.

Conclusion#

The lsmod command displays a list of the currently loaded kernel modules.

Feel free to leave a comment if you have any questions.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install R on Ubuntu 20.04
Next Article   How to Install Xrdp Server (Remote Desktop) on Debian 10

Related Posts

  • How to Use sed to Find and Replace String in Files

    How to Use sed to Find and Replace String in Files

    December 18, 2020
  • Linux Head Command

    Linux Head Command

    December 16, 2020
  • Rename Files and Directories in Linux

    How to Rename Files and Directories in Linux

    December 15, 2020

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook