Linux

Where Are modprobe Rules Stored on Linux?

modprobe reads /etc/modprobe.d over system dirs. Options, blacklist, aliases, and softdeps.

Last updated

modprobe options live in /etc/modprobe.d/*.conf for admin rules, with /run, /usr/local/lib, and /lib variants below it in precedence. One command per line: options for parameters, blacklist to ignore in tree aliases, alias for renames, install and remove for overrides, softdep for ordering hints.

Underscores and dashes interchange in names. A classic use is options snd-hda-intel index tweaks or blacklisting nouveau for proprietary drivers. Remember initramfs: rules needed at early boot must be baked in with update-initramfs, or the running system and the boot image disagree.

Where Linux modprobe stores this, by platform

Linux
/etc/modprobe.d

.conf files only; /etc wins over /run and /lib twins. Rebuild initramfs after changes that matter at boot. modinfo shows a module's own aliases as a last resort reference.

Frequently asked questions

how do i blacklist a kernel module

Add blacklist <name> in a new /etc/modprobe.d file, then rebuild initramfs and reboot. Blacklist only ignores aliases; a manual modprobe still loads it, so verify with lsmod.

how do i pass options to a kernel module

Add options <name> key=value lines in /etc/modprobe.d. They apply at insert whether manual or dependency pulled. Rebuild initramfs when the module loads during early boot.

Notice an outdated path? Let us know.