HOME

TheInfoList



OR:

modprobe is a
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
program that provides for loading a
loadable kernel module A loadable kernel module (LKM) is an executable library that extends the capabilities of a running kernel, or so-called ''base kernel'', of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and/or ...
into a
Linux kernel The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
, unloading a loaded module and many other related features. It provides an ability to make decisions about which modules to load, awareness of module dependencies, so that when requested to load a module, it adds other required modules first and resolution of recursive module dependencies. It is commonly used indirectly. For example,
udev udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices ...
relies upon modprobe to load drivers for automatically detected hardware. Modprobe was originally written by
Rusty Russell Rusty Russell is an Australian free software programmer and advocate, known for his work on the Linux kernel's networking subsystem and the Filesystem Hierarchy Standard. Software development Russell wrote the packet filtering systems ipch ...
and is distributed as part of the software package "kmod" (maintained by Lucas De Marchi and others). It was previously developed as: * "module-init-tools", for Linux kernel version 2.6 and later (maintained by Jon Masters and others) * "modutils" for use with Linux versions 2.2.x and 2.4.x. .


Operation

When invoked with no switches, the program adds/inserts/installs the module specified by name. Arguments after the module name are passed to the kernel. Configuration file options are also passed. In some versions of modprobe, the configuration file is called modprobe.conf, and in others, the equivalent is the collection of files called in the /etc/modprobe.d directory. modprobe looks only in the standard module directories. To install modules from the working directory insmod is required. Alternatively, a symbolic link file can be used so that depmod can find it.
Root In vascular plants, the roots are the plant organ, organs of a plant that are modified to provide anchorage for the plant and take in water and nutrients into the plant body, which allows plants to grow taller and faster. They are most often bel ...
privileges are typically required to perform the actions that modprobe attempts.


Features

The program has more configuration features than other similar utilities. It is possible to define module aliases allowing for some automatic loading of modules. When the kernel requires a module, it actually runs modprobe to request it; however, the kernel has a description of only some module properties (for example, a device major number, or the number of a
network protocol A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any variation of a physical quantity. The protocol defines the rules, syntax, semantics, and synchronization of ...
), and modprobe does the job of translating that to an actual module name via aliases. The program also has the ability to run programs before or after loading or unloading a given module. For example, setting the mixer right after loading a
sound card A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio ...
module, or uploading the
firmware In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, h ...
to a device immediately prior to enabling it. Although these actions must be implemented by external programs, modprobe synchronizes their execution with module loading/unloading.


Blacklist

There are cases where two or more modules both support the same devices, or a module invalidly claims to support a device: the blacklist keyword indicates that all of a particular module's internal aliases are to be ignored.modprobe.conf(5) - Linux man page
/ref> There are a couple of ways to
blacklist Blacklisting is the action of a group or authority compiling a blacklist of people, countries or other entities to be avoided or distrusted as being deemed unacceptable to those making the list; if people are on a blacklist, then they are considere ...
a module, and depending on the method used to load it depends on where this is configured. There are two ways to blacklist a module using modprobe, employing the modprobe.conf system, the first is to use its blacklisting system in /etc/modprobe.d/. Any filename ending with .conf can be used: cat /etc/modprobe.d/blacklist.conf blacklist ieee1394 blacklist ohci1394 blacklist eth1394 blacklist sbp2 An install primitive is the highest priority in the config file and will be used instead of the blacklisting method above, requiring this second method: cat /etc/modprobe.d/ieee1394.conf install ieee1394 /bin/true install ohci1394 /bin/true install eth1394 /bin/true install sbp2 /bin/true Alternately, you can modify /etc/modprobe.conf: alias sub_module /dev/null alias module_main /dev/null options module_main needed_option=0


See also

*


References

{{Reflist


External links


modprobe man page

modprobe.conf

modules.dep
Command-line software Linux kernel-related software