Where Are Linux Kernel Modules and Options Stored?
Linux loads kernel modules from /lib/modules with boot options in modprobe and modules-load files. Paths and commands.
Last updated
Linux keeps kernel drivers as .ko files in versioned folders under /lib/modules, one folder per installed kernel from uname -r. modprobe consults those trees plus a dependency map to load drivers on demand. Nothing here is edited directly except through the designated drop-in directories.
Boot behavior comes from two small config families. /etc/modprobe.d holds aliases, options and blacklists that shape how modules load. /etc/modules-load.d lists modules to force-load at boot. Vendor defaults ship the same filenames under /usr/lib, and anything in /etc overrides them, so always put your edits in /etc.
Where Linux kernel stores this, by platform
/lib/modules
Versioned subfolders per kernel (check uname -r): kernel drivers plus modules.dep maps. Boot loading from /etc/modules-load.d/*.conf; options, aliases and blacklists from /etc/modprobe.d/*.conf. Vendor defaults under /usr/lib lose to /etc. Inspect with lsmod, configure with modprobe, rebuild maps with depmod.
Frequently asked questions
how do i load a kernel module at boot
Add a line with the module name to a .conf file in /etc/modules-load.d and reboot. For options, add an options line in /etc/modprobe.d instead. Blacklisting uses a blacklist line in the same modprobe.d directory. The Arch wiki documents each pattern; the paths here are where those files live.
why will my module not load
It is blacklisted or soft-blocked somewhere in the chain. Check /etc/modprobe.d and /usr/lib/modprobe.d for blacklist or install-false lines, then confirm with lsmod whether it loaded anyway. modprobe -c dumps the effective configuration when files disagree.
when do i need to run depmod
depmod rebuilds the dependency map that modprobe consults, and it runs automatically on kernel installs. Run it by hand after manually adding modules to /lib/modules, followed by dracut or mkinitcpio if the module must exist in early boot. A missing depmod step is the classic reason hand-installed drivers vanish.
Notice an outdated path? Let us know.