Understanding Modprobe Command and its Uses in Linux

04 May 2023 Balmiki Mandal 0 Linux

What is Modprobe Command in Linux?

Modprobe command in Linux is a very useful command to load, remove and list the kernel modules. Kernel modules are pieces of code which can extend the functionality of the kernel without needing to be permanently present in the kernel image. Modules can also be dynamically loaded and unloaded while the system is running. The modprobe command takes care of all the generally necessary steps to load a module - it searches in the module directories for the requested module, resolves any dependencies and loads the module into the kernel.

How to use Modprobe Command in Linux?

The modprobe command is used to add and remove modules from the Linux kernel. It is usually used when a new device driver has been added and needs to be loaded into memory for it to work. The syntax for the modprobe command is:

modprobe [options] module-name

Examples of Modprobe Command in Linux

  • To list all the loaded modules in the kernel, use the following command:

    modprobe -l

  • To load a kernel module into memory, use the following command:

    modprobe module-name

  • To remove a module from the kernel, use the following command:

    modprobe -r module-name

  • To load a module with options, use the following command:

    modprobe module-name option1=value1 option2=value2

BY: Balmiki Mandal

Related Blogs

Post Comments.

Login to Post a Comment

No comments yet, Be the first to comment.