modprobe Command Options

The modprobe command is used to add and remove modules from the currently running kernel. Note that it also attempts to load module dependencies.

Syntax:

# modprobe [options] [module_name]

Key Options for the modprobe Command:

  • -c displays the current modprobe configuration.
  • -q runs in quiet mode.
  • -R displays all modules that match an alias to assist you in debugging issues.
  • -r removes the specified module from memory.
  • -v displays verbose messages; this is useful for determining how modprobe is performing a task.

modprobe Command Options

Option Description
-a,–all Insert all module names on the command line.
-b,–use-blacklist This option causesmodprobeto apply theblacklistcommands in the configuration files (if any) to module names as well.
-C,–config This option overrides the default configuration directory (/etc/modprobe.d). This option is passed through install or remove commands to other modprobe commands in the MODPROBE_OPTIONS environment variable.
-c,–showconfig Dump out the effective configuration from the config directory and exit.
–dump-modversions Print out a list of module versioning information required by a module. This option is commonly used by distributions in order to package up a Linux kernel module using module versioning deps.
-d,–dirname Root directory for modules, / by default.
–first-time this option makes modprobe fail in the case that it actually didn’t do anything.
–force-vermagic If a module fails to load and the kernel complains that the “version magic” doesn’t match, you can use this option to remove it.
–force-modversion If a module fails to load and the kernel complains that the module disagrees about a version of some interface, you can use “–force-modversion” to remove the version information altogether.
-f,–force Try to strip any versioning information from the module which might otherwise stop it from loading: this is the same as using both –force-vermagic and –force-modversion.
-i,–ignore-install,–ignore-remove This option causes modprobe to ignore install and remove commands in the configuration file (if any) for the module specified on the command line (any dependent modules are still subject to commands set for them in the configuration file).
-n,–dry-run,–show This option does everything but actually insert or delete the modules (or run the install or remove commands).
-q,–quiet With this flag,modprobewon’t print an error message if you try to remove or insert a module it can’t find (and isn’t an alias orinstall/removecommand).
-R,–resolve-alias Print all module names matching an alias. This can be useful for debugging module alias problems.
-r,–remove This option causesmodprobeto remove rather than insert a module.
-S,–set-version Set the kernel version, rather than using uname(2) to decide on the kernel version (which dictates where to find the modules).
–show-depends List the dependencies of a module (or alias), including the module itself.
-s,–syslog This option causes any error messages to go through the syslog mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to standard error.
-V,–version Show version of program and exit.
-v,–verbose Print messages about what the program is doing.
Related Post