Lsmod Command in Linux (List Kernel Modules) - MS TV Life.COM

Lsmod Command in Linux (List Kernel Modules)

Lsmod Command in Linux (List Kernel Modules)

lsmod is a command-line utility that shows details about the loaded Linux kernel modules.

Kernel modules #

The kernel is the core part of an working system. It manages the system’s sources, and it’s a bridge between your pc’s {hardware} and software program.

How to Install Mono on CentOS 8

The Linux kernel has a modular design. A kernel module, or also known as driver, is a chunk of code that reach the kernel’s performance. Modules are both compiled as loadable modules or constructed into the kernel. Loadable modules could be loaded and unloaded within the working kernel on request, with out the necessity to reboot the system.

Usually, the modules are loaded on demand by udev (machine supervisor). You can even manually load a module into the kernel utilizing the modprobe command, or robotically at boot time utilizing /and many others/modules or /and many others/modules-load.d/*.conf recordsdata.

The kernel modules are saved within the /lib/modules/<kernel_version> listing. To search out the discharge version of the running kernel, use the uname -r command.

How to Install and Use PHP Composer on CentOS 8

lsmod Command #

lsmod is an easy utility that doesn’t settle for any choices or arguments. What the command does is that it reads /proc/modules and show the file contents in a properly formatted record.

Run lsmod on the command line to seek out out what kernel modules are at the moment loaded:

lsmod

The command outputs data for every loaded kernel module on a brand new line:

Module                  Measurement  Utilized 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
...

Every line has three columns:

  • Module – The primary column reveals the title of the module.
  • Measurement – The second column reveals the dimensions of the module in bytes.
  • Utilized by – The third column reveals a quantity that signifies what number of cases of the module are at the moment used. A worth of zero implies that the module isn’t used. The comma-separated record after the quantity reveals what’s utilizing the module.

To search out out whether or not a particular module is loaded, filter the output with grep. For instance to seek out whether or not the kvm module is loaded you’ll run:

lsmod | grep kvm
kvm_intel             278528  0
kvm                   651264  1 kvm_intel
irqbypass              16384  1 kvm

For detailed details about a module, use the modinfo command.

Conclusion #

The lsmod command reveals an inventory of the at the moment loaded kernel modules.

How to Install and Configure Redmine on CentOS 8

Be at liberty to go away a remark you probably have any questions.

Copy link
Powered by Social Snap