modprobe, lsmod, modinfo Command Tutorial With Examples To Load, List Linux Kernel Modules

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/modprobe-lsmod-modinfo-command-tutorial-with-examples-to-load-list-linux-kernel-modules/
PINTEREST
PINTEREST
INSTAGRAM

What makes an Operating system Linux Distribution? All Linux distributions use same kernel named Linux Kernel. Linux kernel provides operating system services, hardware management, process management, memory management etc.

Linux kernel is a monolithic kernel which means single executable all in one. But the operating systems should provide dynamic environments to comply user needs. Linux provides mechanism to load some drivers, features etc. This is called kernel modules. In this tutorial we will look kernel modules operations with modprobe command. Most of the examples in this tutorial requires root privileges.

Help

Help

Help

List Available Kernel Modules

Linux kernel came with a lot of default kernel modules. These modules are loaded according to requirements and kernel config provided by the distribution. There is also an option to add new kernel modules externally to the Linux. We can list all of these modules with lsmod command

List Available Kernel Modules

List Available Kernel Modules

OR another way

List Available Kernel Modules

List Available Kernel Modules

List Loaded Modules

As we know kernel modules are loaded or unloaded. We can list only installed kernel modules by using previous command. but in this command we need some external help. We will use egrep to filter installed kernel modules.

List Loaded Modules

List Loaded Modules

Get Information About Kernel Module

Kernel modules can get different parameter for configuration purposes. Also there are different type of information. Here are some of them which can be listed with modinfo command.

  • filename what is modules file name and the path
  • license modules license type like GPL,GPL2,Apache,TM
  • description short description abount the kernel module
  • depends specify what other kernel modules are needed to load this module
  • intree specifys if this kernel module is maintained in kernel git repository
  • vermagic specifies the version of the kernel module
  • parm specifies parameter that can be used to configure this kernel module.
LEARN MORE  Linux OS and Distributions

Get Information About Kernel Module

Get Information About Kernel Module

Load or Install New Kernel Modules

Generally Linux operating system automatically loads related kernel modules. There is no need to load them manually in most situations. But some times manual operation may be needed to load kernel modules. We will install module named ipx by using insmod in this example.

Remove or Unload Loaded Kernel Module

We can remove kernel modules. We will use modprobe command againg with -r option by providing the kernel module name. In this example we unload ipx kernel module

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/modprobe-lsmod-modinfo-command-tutorial-with-examples-to-load-list-linux-kernel-modules/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)