Add and remove modules from the Linux kernel
The modprobe command intelligently adds or removes modules from the Linux kernel. It handles dependencies automatically by consulting the modules.dep file generated by depmod. If a module depends on others, modprobe will load them first. If loading fails, modprobe will automatically unload the group of modules it attempted to load.
modprobe [OPTION]... [MODULE_NAME] [MODULE_PARAMETERS...]
-a, --all:Load all specified modules.
-c, --show-config:Display the current configuration (including aliases).
-d, --debug:Enable debug mode.
-l, --list:List all available modules matching a pattern (deprecated in newer versions).
-r, --remove:Unload (remove) the specified module and any unused dependent modules.
-t, --type <type>:Restrict the search to a specific module type.
-v, --verbose:Print detailed information during execution.
-V, --version:Display version information.
--help:Display help message.
Module Name: The name of the module to load or remove.
View module configuration (including aliases):
modprobe -c
This will print various configuration lines, such as:
alias symbol:ip_conntrack_unregister_notifier ip_conntrack
List all available modules (older versions):
modprobe -l
Available modules are typically stored in /lib/modules/$(uname -r)/.
Load a module (e.g., vfat):
modprobe vfat
Note: Do not include the .ko or .o extension when using modprobe. Verify loaded modules using lsmod.
Remove a loaded module:
modprobe -r <module_name>
This functions similarly to rmmod but also attempts to remove unused dependent modules.