MODPROBE.D(5)
๐ modprobe.d โ the group chat for your kernel modules ๐
okay bestie, so this is the modprobe.d(5) page, and it's literally the manual for the configuration directory that tells modprobe how to behave. it's giving "settings folder but make it kernel". let's get into it ๐ฆ
โจ NAME โจ
modprobe.d โ configuration directory for modprobe โจ
โจ SYNOPSIS โจ
/etc/modprobe.d/*.conf
/run/modprobe.d/*.conf
/usr/local/lib/modprobe.d/*.conf
/usr/lib/modprobe.d/*.conf
/lib/modprobe.d/*.conf
like. those are the directories. that's the whole vibe. ๐
โจ DESCRIPTION โจ
so here's the situation: the modprobe command can add or remove more than one module at a time, because modules have dependencies (modules depend on other modules, it's a whole thing ๐). so we need a way to say "hey, when you load this one, use these options". that's what these files are for.
you can also use them to make convenient aliases โ basically alternate names for a module, like a nickname but for kernel code ๐
โ or you can override the normal modprobe behavior entirely for modules with special requirements (for example, when you need to insert more than one module).
heads up: module and alias names (just like other module names) can have-or_in them, and bestie, both are interchangeable throughout all the module commands, because underscore conversion happens automatically. periodt.
โจ CONFIGURATION FORMAT โจ
the configuration files contain one command per line. blank lines and lines starting with # get ignored (so useful for comments, love that for us ๐). and a \ at the end of a line makes it continue onto the next line, which just makes the files a little neater.
see the COMMANDS section below for more. ๐ธ
โจ CONFIGURATION DIRECTORIES AND PRECEDENCE โจ
configuration files are read from the directories listed in SYNOPSIS, in that order of precedence. once a file with a given filename is loaded, any file with the same name in the directories after it gets ignored. sorry to that file ๐ญ
all configuration files get sorted in lexicographic order, regardless of which directory they live in. configuration files can be either completely replaced (by having a new configuration file with the same name in a directory of higher priority) or partially replaced (by having a configuration file that is ordered later).
NOTE: the configuration directories may be altered via theMODPROBE_OPTIONSenvironment variable. see the ENVIRONMENT section inmodprobe(8).
โจ COMMANDS โจ
๐ alias wildcard modulename
this lets you give alternate names for a module. for example: "alias my-mod really_long_modulename" means you can use "modprobe my-mod" instead of "modprobe really_long_modulename". iconic, right?
you can also use shell-style wildcards, so "alias my-mod* really_long_modulename" means that "modprobe my-mod-something" has the same effect. โจ
you can't have aliases to other aliases (that way lies madness, fr fr ๐), but aliases can have options, which will be added to any other options.
note that modules can also contain their own aliases, which you can see usingmodinfo. these aliases are used as a last resort (ie. if there is no real module,install,remove, oraliascommand in the configuration).
๐ blacklist modulename
modules can contain their own aliases: usually these are aliases describing the devices they support, such as "pci:123...". these "internal" aliases can be overridden by normal "alias" keywords, but there are cases where two or more modules both support the same devices, or a module invalidly claims to support a device that it does not. the blacklist keyword says: all of that particular module's internal aliases are to be ignored. ๐ซโจ
๐ install modulename command...
this command instructs modprobe to run your command instead of inserting the module in the kernel as normal. the command can be any shell command, which means you can do any kind of complex processing you might wish. main character energy honestly ๐
for example, if the module "fred" works better with the module "barney" already installed (but it doesn't depend on it, so modprobe won't automatically load it), you could say:
install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred
which would do what you wanted. note the --ignore-install, which stops the second modprobe from running the same install command again. see also remove below. ๐
the long term future of this command as a solution to the problem of providing additional module dependencies is not assured, and it is intended to replace this command with a warning about its eventual removal or deprecation at some point in a future release. its use complicates the automated determination of module dependencies by distribution utilities, such asmkinitrd(because these now need to somehow interpret what theinstallcommands might be doing). in a perfect world, modules would provide all dependency information without the use of this command, and work is underway to implement soft dependency support within the Linux kernel.
if you use the string "$CMDLINE_OPTS" in the command, it will be replaced by any options specified on the modprobe command line. this can be useful because users expect "modprobe fred opt=1" to pass the "opt=1" arg to the module, even if there's an install command in the configuration file. so our above example becomes:
install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred $CMDLINE_OPTS
๐ options modulename option...
this command lets you add options to the module modulename (which might be an alias) every time it is inserted into the kernel: whether directly (using modprobe modulename) or because the module being inserted depends on this module. ๐
all options are added together: they can come from an option for the module itself, for an alias, and on the command line. team effort ๐
๐ remove modulename command...
this is similar to the install command above, except it is invoked when "modprobe -r" is run. bye bestie ๐
๐ softdep modulename pre: modules... post: modules...
the softdep command allows you to specify soft, or optional, module dependencies. modulename can be used without these optional modules installed, but usually with some features missing. for example, a driver for a storage HBA might require another module be loaded in order to use management features. ๐ธ
pre-deps and post-deps modules are lists of names and/or aliases of other modules that modprobe will attempt to install (or remove) in order โ before and after the main module given in the modulename argument.
example: assume "softdep c pre: a b post: d e" is provided in the configuration. running "modprobe c" is now equivalent to "modprobe a b c d e" without the softdep. flags such as --use-blacklist are applied to all the specified modules, while module parameters only apply to module c.
note: if there areinstallorremovecommands with the same modulename argument,softdeptakes precedence. sorry install, softdep ate ๐
๐ weakdep modulename modules...
the weakdep command allows you to specify weak module dependencies. those are similar to pre softdep, with the difference that userspace doesn't attempt to load that dependency before the specified module. instead, the kernel may request one or multiple of them during module probe, depending on the hardware it's binding to. the purpose of a weak module is to allow a driver to specify that a certain dependency may be needed, so it should be present in the filesystem (e.g. in initramfs) when that module is probed. ๐ฆ
example: assume "weakdep c a b". a program creating an initramfs knows it should add a, b, and c to the filesystem since a and b may be required/desired at runtime. when c is loaded and is being probed, it may issue calls to request_module() causing a or b to also be loaded.
โจ COMPATIBILITY โจ
a future version of kmod will come with a strong warning to avoid use of the install as explained above. this will happen once support for soft dependencies in the kernel is complete. that support will complement the existing softdep support within this utility by providing such dependencies directly within the modules. ๐ฎ
โจ COPYRIGHT โจ
this manual page originally Copyright 2004, Rusty Russell, IBM Corporation. ๐
โจ SEE ALSO โจ
โจ BUGS โจ
please direct any bug reports to kmod's issue tracker at https://github.com/kmod-project/kmod/issues/ alongside with version used, steps to reproduce the problem and the expected outcome. ๐ (don't be shy, they want the deets ๐ซถ)
โจ AUTHORS โจ
numerous contributions have come from the linux-modules mailing list <linux-modules@vger.kernel.org> and Github. if you have a clone of kmod.git itself, the output of git-shortlog(1) and git-blame(1) can show you the authors for specific parts of the project. ๐
Lucas De Marchi <lucas.de.marchi@gmail.com> is the current maintainer of the project. ๐
aaaand that's the whole page bestie!! this waskmodversion dated 2026-10-30, from themodprobe.dmanual. stay slay, keep your modules tidy, and remember: no aliases to aliases. that way lies madness ๐ โจ
๐ฆ where this page comes from
- arch rolling: kmod 34.3-1 ยท LGPL-2.1-or-later AND GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms