1MODPROBE(8) modprobe MODPROBE(8)
2
3
4
6 modprobe - Add and remove modules from the Linux Kernel
7
9 modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [modulename]
10 [module parameters...]
11
12 modprobe [-r] [-v] [-n] [-i] [modulename...]
13
14 modprobe [-c]
15
16 modprobe [--dump-modversions] [filename]
17
19 modprobe intelligently adds or removes a module from the Linux kernel:
20 note that for convenience, there is no difference between _ and - in
21 module names (automatic underscore conversion is performed). modprobe
22 looks in the module directory /lib/modules/`uname -r` for all the
23 modules and other files, except for the optional configuration files in
24 the /etc/modprobe.d directory (see modprobe.d(5)). modprobe will also
25 use module options specified on the kernel command line in the form of
26 <module>.<option> and blacklists in the form of
27 modprobe.blacklist=<module>.
28
29 Note that unlike in 2.4 series Linux kernels (which are not supported
30 by this tool) this version of modprobe does not do anything to the
31 module itself: the work of resolving symbols and understanding
32 parameters is done inside the kernel. So module failure is sometimes
33 accompanied by a kernel message: see dmesg(8).
34
35 modprobe expects an up-to-date modules.dep.bin file as generated by the
36 corresponding depmod utility shipped along with modprobe (see
37 depmod(8)). This file lists what other modules each module needs (if
38 any), and modprobe uses this to add or remove these dependencies
39 automatically.
40
41 If any arguments are given after the modulename, they are passed to the
42 kernel (in addition to any options listed in the configuration file).
43
45 -a, --all
46 Insert all module names on the command line.
47
48 -b, --use-blacklist
49 This option causes modprobe to apply the blacklist commands in the
50 configuration files (if any) to module names as well. It is usually
51 used by udev(7).
52
53 -C, --config
54 This option overrides the default configuration directory
55 (/etc/modprobe.d).
56
57 This option is passed through install or remove commands to other
58 modprobe commands in the MODPROBE_OPTIONS environment variable.
59
60 -c, --showconfig
61 Dump out the effective configuration from the config directory and
62 exit.
63
64 --dump-modversions
65 Print out a list of module versioning information required by a
66 module. This option is commonly used by distributions in order to
67 package up a Linux kernel module using module versioning deps.
68
69 -d, --dirname
70 Root directory for modules, / by default.
71
72 --first-time
73 Normally, modprobe will succeed (and do nothing) if told to insert
74 a module which is already present or to remove a module which isn't
75 present. This is ideal for simple scripts; however, more
76 complicated scripts often want to know whether modprobe really did
77 something: this option makes modprobe fail in the case that it
78 actually didn't do anything.
79
80 --force-vermagic
81 Every module contains a small string containing important
82 information, such as the kernel and compiler versions. If a module
83 fails to load and the kernel complains that the "version magic"
84 doesn't match, you can use this option to remove it. Naturally,
85 this check is there for your protection, so using this option is
86 dangerous unless you know what you're doing.
87
88 This applies to any modules inserted: both the module (or alias) on
89 the command line and any modules on which it depends.
90
91 --force-modversion
92 When modules are compiled with CONFIG_MODVERSIONS set, a section
93 detailing the versions of every interfaced used by (or supplied by)
94 the module is created. If a module fails to load and the kernel
95 complains that the module disagrees about a version of some
96 interface, you can use "--force-modversion" to remove the version
97 information altogether. Naturally, this check is there for your
98 protection, so using this option is dangerous unless you know what
99 you're doing.
100
101 This applies any modules inserted: both the module (or alias) on
102 the command line and any modules on which it depends.
103
104 -f, --force
105 Try to strip any versioning information from the module which might
106 otherwise stop it from loading: this is the same as using both
107 --force-vermagic and --force-modversion. Naturally, these checks
108 are there for your protection, so using this option is dangerous
109 unless you know what you are doing.
110
111 This applies to any modules inserted: both the module (or alias) on
112 the command line and any modules it on which it depends.
113
114 -i, --ignore-install, --ignore-remove
115 This option causes modprobe to ignore install and remove commands
116 in the configuration file (if any) for the module specified on the
117 command line (any dependent modules are still subject to commands
118 set for them in the configuration file). Both install and remove
119 commands will currently be ignored when this option is used
120 regardless of whether the request was more specifically made with
121 only one or other (and not both) of --ignore-install or
122 --ignore-remove. See modprobe.d(5).
123
124 -n, --dry-run, --show
125 This option does everything but actually insert or delete the
126 modules (or run the install or remove commands). Combined with -v,
127 it is useful for debugging problems. For historical reasons both
128 --dry-run and --show actually mean the same thing and are
129 interchangeable.
130
131 -q, --quiet
132 With this flag, modprobe won't print an error message if you try to
133 remove or insert a module it can't find (and isn't an alias or
134 install/remove command). However, it will still return with a
135 non-zero exit status. The kernel uses this to opportunistically
136 probe for modules which might exist using request_module.
137
138 -R, --resolve-alias
139 Print all module names matching an alias. This can be useful for
140 debugging module alias problems.
141
142 -r, --remove
143 This option causes modprobe to remove rather than insert a module.
144 If the modules it depends on are also unused, modprobe will try to
145 remove them too. Unlike insertion, more than one module can be
146 specified on the command line (it does not make sense to specify
147 module parameters when removing modules).
148
149 There is usually no reason to remove modules, but some buggy
150 modules require it. Your distribution kernel may not have been
151 built to support removal of modules at all.
152
153 -w, --wait=TIMEOUT_MSEC
154 This option causes modprobe -r to continue trying to remove a
155 module if it fails due to the module being busy, i.e. its refcount
156 is not 0 at the time the call is made. Modprobe tries to remove the
157 module with an incremental sleep time between each tentative up
158 until the maximum wait time in milliseconds passed in this option.
159
160 -S, --set-version
161 Set the kernel version, rather than using uname(2) to decide on the
162 kernel version (which dictates where to find the modules).
163
164 --show-depends
165 List the dependencies of a module (or alias), including the module
166 itself. This produces a (possibly empty) set of module filenames,
167 one per line, each starting with "insmod" and is typically used by
168 distributions to determine which modules to include when generating
169 initrd/initramfs images. Install commands which apply are shown
170 prefixed by "install". It does not run any of the install commands.
171 Note that modinfo(8) can be used to extract dependencies of a
172 module from the module itself, but knows nothing of aliases or
173 install commands.
174
175 -s, --syslog
176 This option causes any error messages to go through the syslog
177 mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to
178 standard error. This is also automatically enabled when stderr is
179 unavailable.
180
181 This option is passed through install or remove commands to other
182 modprobe commands in the MODPROBE_OPTIONS environment variable.
183
184 -V, --version
185 Show version of program and exit.
186
187 -v, --verbose
188 Print messages about what the program is doing. Usually modprobe
189 only prints messages if something goes wrong.
190
191 This option is passed through install or remove commands to other
192 modprobe commands in the MODPROBE_OPTIONS environment variable.
193
195 The MODPROBE_OPTIONS environment variable can also be used to pass
196 arguments to modprobe.
197
199 This manual page originally Copyright 2002, Rusty Russell, IBM
200 Corporation. Maintained by Jon Masters and others.
201
203 modprobe.d(5), insmod(8), rmmod(8), lsmod(8), modinfo(8) depmod(8)
204
206 Jon Masters <jcm@jonmasters.org>
207 Developer
208
209 Robby Workman <rworkman@slackware.com>
210 Developer
211
212 Lucas De Marchi <lucas.de.marchi@gmail.com>
213 Developer
214
215
216
217kmod 06/30/2022 MODPROBE(8)