| 1 |
.\" Generated by scdoc 1.11.4 |
| 2 |
.\" Complete documentation for this program is not available as a GNU info page |
| 3 |
.ie \n(.g .ds Aq \(aq |
| 4 |
.el .ds Aq ' |
| 5 |
.nh |
| 6 |
.ad l |
| 7 |
.\" Begin generated content: |
| 8 |
.TH "MODPROBE" "8" "2026-04-26" "kmod" "modprobe" |
| 9 |
.PP |
| 10 |
.SH NAME |
| 11 |
.PP |
| 12 |
modprobe - Add and remove modules from the Linux Kernel |
| 13 |
.PP |
| 14 |
.SH SYNOPSIS |
| 15 |
.PP |
| 16 |
\fBmodprobe\fR [\fB-v\fR] [\fB-V\fR] [\fB-C\fR \fIconfig-file\fR] [\fB-n\fR] [\fB-i\fR] [\fB-q\fR] [\fB-b\fR] [\fImodulename\fR] |
| 17 |
[\fImodule parameters\fR.\&.\&.\&] |
| 18 |
.PP |
| 19 |
\fBmodprobe\fR [\fB-r\fR] [\fB-v\fR] [\fB-n\fR] [\fB-i\fR] [\fImodulename\fR.\&.\&.\&] |
| 20 |
.PP |
| 21 |
\fBmodprobe\fR [\fB-c\fR] |
| 22 |
.PP |
| 23 |
\fBmodprobe\fR [\fB--dump-modversions\fR] [\fIfilename\fR] |
| 24 |
.PP |
| 25 |
.SH DESCRIPTION |
| 26 |
.PP |
| 27 |
\fBmodprobe\fR intelligently adds or removes a module from the Linux kernel: note |
| 28 |
that for convenience, there is no difference between _ and - in module names |
| 29 |
(automatic underscore conversion is performed).\& \fBmodprobe\fR looks in the module |
| 30 |
directory /usr/lib/`uname -r` for all the modules and other files, except |
| 31 |
for the optional configuration files (see \fBmodprobe.\&d\fR(5)).\& \fBmodprobe\fR will also |
| 32 |
use module options specified on the kernel command line in the form of |
| 33 |
<module>.\&<option> and blacklists in the form of modprobe.\&blacklist=<module>.\& |
| 34 |
.PP |
| 35 |
Note that unlike in 2.\&4 series Linux kernels (which are not supported by this |
| 36 |
tool) this version of \fBmodprobe\fR does not do anything to the module itself: the |
| 37 |
work of resolving symbols and understanding parameters is done inside the |
| 38 |
kernel.\& So module failure is sometimes accompanied by a kernel message: see |
| 39 |
\fBdmesg\fR(8).\& |
| 40 |
.PP |
| 41 |
\fBmodprobe\fR expects an up-to-date modules.\&dep.\&bin file as generated by the |
| 42 |
corresponding \fBdepmod\fR utility shipped along with \fBmodprobe\fR (see \fBdepmod\fR(8)).\& |
| 43 |
This file lists what other modules each module needs (if any), and \fBmodprobe\fR |
| 44 |
uses this to add or remove these dependencies automatically.\& |
| 45 |
.PP |
| 46 |
If any arguments are given after the \fImodulename\fR, they are passed to the kernel |
| 47 |
(in addition to any options listed in the configuration file).\& |
| 48 |
.PP |
| 49 |
When loading modules, \fImodulename\fR can also be a path to the module.\& If the path |
| 50 |
is relative, it must explicitly start with ".\&/".\& Note that this may fail when |
| 51 |
using a path to a module with dependencies not matching the installed \fBdepmod\fR |
| 52 |
database.\& |
| 53 |
.PP |
| 54 |
.SH OPTIONS |
| 55 |
.PP |
| 56 |
\fB-a\fR, \fB--all\fR |
| 57 |
.RS 4 |
| 58 |
Insert all module names on the command line.\& |
| 59 |
.PP |
| 60 |
.RE |
| 61 |
\fB-b\fR, \fB--use-blacklist\fR |
| 62 |
.RS 4 |
| 63 |
This option causes \fBmodprobe\fR to apply the \fBblacklist\fR commands in the |
| 64 |
configuration files (if any) to module names as well.\& It is usually used |
| 65 |
by \fBudev\fR(7).\& |
| 66 |
.PP |
| 67 |
.RE |
| 68 |
\fB-C\fR \fIdirectory\fR, \fB--config\fR=\fIdirectory\fR |
| 69 |
.RS 4 |
| 70 |
This option overrides the default configuration directory.\& See |
| 71 |
\fBmodprobe.\&d\fR(5).\& |
| 72 |
.PP |
| 73 |
This option is passed through \fBinstall\fR or \fBremove\fR commands to other |
| 74 |
\fBmodprobe\fR commands in the MODPROBE_OPTIONS environment variable.\& |
| 75 |
.PP |
| 76 |
.RE |
| 77 |
\fB-c\fR, \fB--showconfig\fR |
| 78 |
.RS 4 |
| 79 |
Dump out the effective configuration from the config directory and exit.\& |
| 80 |
.PP |
| 81 |
.RE |
| 82 |
\fB--dump-modversions\fR |
| 83 |
.RS 4 |
| 84 |
Print out a list of module versioning information required by a module.\& |
| 85 |
This option is commonly used by distributions in order to package up a |
| 86 |
Linux kernel module using module versioning deps.\& |
| 87 |
.PP |
| 88 |
.RE |
| 89 |
\fB-d\fR, \fB--dirname\fR |
| 90 |
.RS 4 |
| 91 |
Root directory for modules, / by default.\& |
| 92 |
.PP |
| 93 |
.RE |
| 94 |
\fB--first-time\fR |
| 95 |
.RS 4 |
| 96 |
Normally, \fBmodprobe\fR will succeed (and do nothing) if told to insert a |
| 97 |
module which is already present or to remove a module which isn'\&t |
| 98 |
present.\& This is ideal for simple scripts; however, more complicated |
| 99 |
scripts often want to know whether \fBmodprobe\fR really did something: this |
| 100 |
option makes \fBmodprobe\fR fail in the case that it actually didn'\&t do |
| 101 |
anything.\& |
| 102 |
.PP |
| 103 |
.RE |
| 104 |
\fB--force-vermagic\fR |
| 105 |
.RS 4 |
| 106 |
Every module contains a small string containing important information, |
| 107 |
such as the kernel and compiler versions.\& If a module fails to load and |
| 108 |
the kernel complains that the "version magic" doesn'\&t match, you can use |
| 109 |
this option to remove it.\& Naturally, this check is there for your |
| 110 |
protection, so using this option is dangerous unless you know what |
| 111 |
you'\&re doing.\& |
| 112 |
.PP |
| 113 |
This applies to any modules inserted: both the module (or alias) on the |
| 114 |
command line and any modules on which it depends.\& |
| 115 |
.PP |
| 116 |
.RE |
| 117 |
\fB--force-modversion\fR |
| 118 |
.RS 4 |
| 119 |
When modules are compiled with CONFIG_MODVERSIONS set, a section |
| 120 |
detailing the versions of every interfaced used by (or supplied by) the |
| 121 |
module is created.\& If a module fails to load and the kernel complains |
| 122 |
that the module disagrees about a version of some interface, you can use |
| 123 |
\fB--force-modversion\fR to remove the version information altogether.\& |
| 124 |
Naturally, this check is there for your protection, so using this option |
| 125 |
is dangerous unless you know what you'\&re doing.\& |
| 126 |
.PP |
| 127 |
This applies to any modules inserted: both the module (or alias) on the |
| 128 |
command line and any modules on which it depends.\& |
| 129 |
.PP |
| 130 |
.RE |
| 131 |
\fB-f\fR, \fB--force\fR |
| 132 |
.RS 4 |
| 133 |
Try to strip any versioning information from the module which might |
| 134 |
otherwise stop it from loading: this is the same as using both |
| 135 |
\fB--force-vermagic\fR and \fB--force-modversion\fR.\& Naturally, these checks are |
| 136 |
there for your protection, so using this option is dangerous unless you |
| 137 |
know what you are doing.\& |
| 138 |
.PP |
| 139 |
This applies to any modules inserted: both the module (or alias) on the |
| 140 |
command line and any modules on which it depends.\& |
| 141 |
.PP |
| 142 |
.RE |
| 143 |
\fB-i\fR, \fB--ignore-install\fR, \fB--ignore-remove\fR |
| 144 |
.RS 4 |
| 145 |
This option causes \fBmodprobe\fR to ignore \fBinstall\fR and \fBremove\fR commands |
| 146 |
in the configuration file (if any) for the module specified on the |
| 147 |
command line (any dependent modules are still subject to commands set |
| 148 |
for them in the configuration file).\& Both \fBinstall\fR and \fBremove\fR commands |
| 149 |
will currently be ignored when this option is used regardless of whether |
| 150 |
the request was more specifically made with only one or other (and not |
| 151 |
both) of \fB--ignore-install\fR or \fB--ignore-remove\fR.\& See \fBmodprobe.\&d\fR(5).\& |
| 152 |
.PP |
| 153 |
.RE |
| 154 |
\fB-n\fR, \fB--dry-run\fR, \fB--show\fR |
| 155 |
.RS 4 |
| 156 |
This option does everything but actually insert or delete the modules |
| 157 |
(or run the install or remove commands).\& Combined with \fB-v\fR, it is |
| 158 |
useful for debugging problems.\& For historical reasons both \fB--dry-run\fR |
| 159 |
and \fB--show\fR actually mean the same thing and are interchangeable.\& |
| 160 |
.PP |
| 161 |
.RE |
| 162 |
\fB-q\fR, \fB--quiet\fR |
| 163 |
.RS 4 |
| 164 |
With this flag, \fBmodprobe\fR won'\&t print an error message if you try to |
| 165 |
remove or insert a module it can'\&t find (and isn'\&t an alias or |
| 166 |
\fBinstall\fR/\fBremove\fR command).\& However, it will still return with a non-zero |
| 167 |
exit status.\& The kernel uses this to opportunistically probe for modules |
| 168 |
which might exist using request_module.\& |
| 169 |
.PP |
| 170 |
.RE |
| 171 |
\fB-R\fR, \fB--resolve-alias\fR |
| 172 |
.RS 4 |
| 173 |
Print all module names matching an alias.\& This can be useful for |
| 174 |
debugging module alias problems.\& |
| 175 |
.PP |
| 176 |
.RE |
| 177 |
\fB\fR\fB-r\fR, \fB--remove\fR |
| 178 |
.RS 4 |
| 179 |
This option causes \fBmodprobe\fR to remove rather than insert a module.\& If |
| 180 |
the modules it depends on are also unused, \fBmodprobe\fR will try to remove |
| 181 |
them too.\& Unlike insertion, more than one module can be specified on the |
| 182 |
command line (it does not make sense to specify module parameters when |
| 183 |
removing modules).\& |
| 184 |
.PP |
| 185 |
There is usually no reason to remove modules, but some buggy modules |
| 186 |
require it.\& Your distribution kernel may not have been built to support |
| 187 |
removal of modules at all.\& |
| 188 |
.PP |
| 189 |
.RE |
| 190 |
\fB-w\fR \fITIMEOUT_MSEC\fR, \fB--wait\fR=\fITIMEOUT_MSEC\fR |
| 191 |
.RS 4 |
| 192 |
This option causes \fBmodprobe -r \fRto continue trying to remove a module |
| 193 |
if it fails due to the module being busy, i.\&e.\& its refcount is not 0 at |
| 194 |
the time the call is made.\& Modprobe tries to remove the module with an |
| 195 |
incremental sleep time between each tentative up until the maximum wait |
| 196 |
time in milliseconds passed in this option.\& |
| 197 |
.PP |
| 198 |
.RE |
| 199 |
\fB-S\fR \fIversion\fR, \fB--set-version\fR=\fIversion\fR |
| 200 |
.RS 4 |
| 201 |
Set the kernel version, rather than using \fBuname\fR(2) to decide on the |
| 202 |
kernel version (which dictates where to find the modules).\& |
| 203 |
.PP |
| 204 |
.RE |
| 205 |
\fB--show-depends\fR |
| 206 |
.RS 4 |
| 207 |
List the dependencies of a module (or alias), including the module |
| 208 |
itself.\& This produces a (possibly empty) set of module filenames, one |
| 209 |
per line, each starting with "insmod" and is typically used by |
| 210 |
distributions to determine which modules to include when generating |
| 211 |
initrd/initramfs images.\& \fBInstall\fR commands which apply are shown |
| 212 |
prefixed by "install".\& It does not run any of the install commands.\& Note |
| 213 |
that \fBmodinfo\fR(8) can be used to extract dependencies of a module from the |
| 214 |
module itself, but knows nothing of aliases or install commands.\& |
| 215 |
.PP |
| 216 |
.RE |
| 217 |
\fB-s\fR, \fB--syslog\fR |
| 218 |
.RS 4 |
| 219 |
This option causes any error messages to go through the syslog mechanism |
| 220 |
(as LOG_DAEMON with level LOG_NOTICE) rather than to standard error.\& |
| 221 |
This is also automatically enabled when stderr is unavailable.\& |
| 222 |
.PP |
| 223 |
This option is passed through \fBinstall\fR or \fBremove\fR commands to other |
| 224 |
\fBmodprobe\fR commands in the MODPROBE_OPTIONS environment variable.\& |
| 225 |
.PP |
| 226 |
.RE |
| 227 |
\fB-V\fR, \fB--version\fR |
| 228 |
.RS 4 |
| 229 |
Show version of program and exit.\& |
| 230 |
.PP |
| 231 |
.RE |
| 232 |
\fB-v\fR, \fB--verbose\fR |
| 233 |
.RS 4 |
| 234 |
Print messages about what the program is doing.\& Usually \fBmodprobe\fR only |
| 235 |
prints messages if something goes wrong.\& |
| 236 |
.PP |
| 237 |
This option is passed through \fBinstall\fR or \fBremove\fR commands to other |
| 238 |
\fBmodprobe\fR commands in the MODPROBE_OPTIONS environment variable.\& |
| 239 |
.PP |
| 240 |
.RE |
| 241 |
.SH ENVIRONMENT |
| 242 |
.PP |
| 243 |
The MODPROBE_OPTIONS environment variable can also be used to pass command line |
| 244 |
arguments to \fBmodprobe\fR.\& The format is intentionally left undocumented, since |
| 245 |
the use by third-party tools and scripts is discouraged.\& |
| 246 |
.PP |
| 247 |
The environment variable originates with the implementation of the install |
| 248 |
rules.\& |
| 249 |
.PP |
| 250 |
.SH COPYRIGHT |
| 251 |
.PP |
| 252 |
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.\& |
| 253 |
.PP |
| 254 |
.SH SEE ALSO |
| 255 |
.PP |
| 256 |
\fBmodprobe.\&d\fR(5), \fBinsmod\fR(8), \fBrmmod\fR(8), \fBlsmod\fR(8), \fBmodinfo\fR(8), \fBdepmod\fR(8) |
| 257 |
.PP |
| 258 |
.SH BUGS |
| 259 |
.PP |
| 260 |
Please direct any bug reports to kmod'\&s issue tracker at |
| 261 |
https://github.\&com/kmod-project/kmod/issues/ alongside with version used, steps |
| 262 |
to reproduce the problem and the expected outcome.\& |
| 263 |
.PP |
| 264 |
.SH AUTHORS |
| 265 |
.PP |
| 266 |
Numerous contributions have come from the linux-modules mailing list |
| 267 |
<linux-modules@vger.\&kernel.\&org> and Github.\& If you have a clone of kmod.\&git |
| 268 |
itself, the output of \fBgit-shortlog\fR(1) and \fBgit-blame\fR(1) can show you the |
| 269 |
authors for specific parts of the project.\& |
| 270 |
.PP |
| 271 |
\fBLucas De Marchi\fR <lucas.\&de.\&marchi@gmail.\&com> is the current maintainer of the |
| 272 |
project.\& |