21.6 C
Texas

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is the word in Linux to refer to the kind of software that performs the same trick as the Windows drivers.

Similarly, modprobe loads the individual module specified, or load a set of dependent modules. Also, the dependencies based on modprobe, as depmod they generate in deciding which modules are going to be loaded. If an error occurs during the loading, the modules download they will be in modprobe in whole group whole.

On the other hand, when installing the Linux operating system, some users at the time of the Linux kernel. Install most of the device driver modules and after the installation, also allows to install the new device drivers. How modules using modprobe commands.

Also, the kernel modules load automatically, but at certain times it is necessary to install the modules manually.

- Advertisement -

On the other hand, in the 2.6 Linux kernel, .ko modules are use instead .o files that have additional information that the kernel uses to load the modules.

To know about everything related to Linux, click here.

Brief description of modprobe

During the system startup, modprobe normally checks the content of three Linux file system targets:

  • The directory /lib/modules/`uname -r`. This is where the kernel modules and related files for kernel use are located.
  • The text file /etc/modules. It includes the list of optional modules that must load by default into the kernel.
  • The blacklist is a file that is located in /etc/modprobe.d/blacklist. They contain the list of modules that should not be loaded into the kernel under any circumstances.

Please note that locations are conventional and may vary between distributions. The directories and files mentioned follow the Debian custom and distro based on it.

Basic use

Let’s suppose that modulename is the module you want to inject into the kernel. That’s what we use for

modprobe modulename

As root or super user or otherwise.

sudo modprobe modulename

On the other hand, you can check that the module is loaded. Asking modprobe for the list of loaded modules.

Modprobe -l

or

Modprobe –list

Finally, you can include the kernel module using the -r or -remove option. As root or super user, or by default using the sudo command.

modprobe -r modulename

or

modprobe --remove modulename

Conclusion

The modprobe is used to load a module or a group of dependent modules. In addition, all modules are marked with a specific label.

Similarly, it stops loading as soon as a module loads successfully.

Modprobe uses a “Makefile” type dependency file, created by depmod. To automatically load the relevant modules from the set of modules available in predefined directory trees.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article