A considerable flexibility of the monolithic Linux kernel is ensured by its kernel modules. By using kernel modules, necessary system functions or drivers can be loaded, reloaded and also be unloaded, or rather removed from the kernel during operation of the kernel.

Table of Contents

Directory Kernel Modules

The command cd (change directory) changes to the modules directory (Fedora, Red Hat) /lib/modules/5.7.17-200.fc32.x86_64 and ls (list) displays the contents of the directory.

Display of the Kernel Modules

The commands kmod list and lsmod provide a list of modules which are currently loaded into the kernel. This information is taken from the virtual file /proc/modules and displayed in a structured way. The output of both commands is identical. Due to the size only excerpts are shown in the following.


Explanation of the Output
  • cryptd – Name of the module
  • 24576 – Memory size of the module in bytes
  • 3 – Number of instances the module is loaded, the value zero means module not loaded
  • ablk_helper, ghash_clmulni_intel, aesni_intel – Dependencies on other modules

In the modules file from the /proc directory there is additional information at the end of each line, this should not remain unmentioned.

  • Live – Loading status of the module, possible values are Live, Loading or Unloading
  • 0xffffffffc0348000 – Kernel memory offset of the module, useful information for bug fixing

With the command cat (concatenate or catenate) the content is displayed via the standard output stdout.