LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

modprobe

intelligently adds or removes modules from the Linux kernel

TLDR

Dry run loading a module
$ sudo modprobe -n module_name
copy
Load a module into kernel
$ sudo modprobe module_name
copy
Remove a module from kernel
$ sudo modprobe -r module_name
copy
Remove module and dependents
$ sudo modprobe -r --remove-holders module_name
copy
Show module dependencies
$ sudo modprobe -D module_name
copy
Show configuration
$ modprobe -c
copy

SYNOPSIS

modprobe [-v] [-n] [-r] [modulename] [parameters...]

DESCRIPTION

modprobe intelligently adds or removes modules from the Linux kernel. It handles module dependencies automatically using modules.dep and searches for modules in /lib/modules/$(uname -r).

PARAMETERS

-v, --verbose

Print detailed information about operations
-n, --dry-run
Preview actions without executing them
-r, --remove
Remove module instead of inserting
-f, --force
Force loading despite version mismatch
-q, --quiet
Suppress errors for missing modules
-b, --use-blacklist
Apply blacklist rules from configuration
-c, --showconfig
Display effective configuration
-D, --show-depends
List module dependencies
--first-time
Fail if module already loaded/not loaded
-i, --ignore-install
Ignore install commands in configuration
-w, --wait=TIMEOUT
Wait and retry if module is busy (on removal)
-S, --set-version
Use specified kernel version
--remove-holders
Also remove dependent modules (with -r)

CONFIGURATION

Configuration files in /etc/modprobe.d/ control module behavior including aliases, options, blacklists, and install/remove commands.

INSTALL

sudo apt install kmod
copy
sudo dnf install kmod
copy
sudo pacman -S kmod
copy
sudo apk add kmod
copy
sudo zypper install kmod
copy
brew install kmod
copy
nix profile install nixpkgs#kmod
copy

CAVEATS

Module names treat underscores and dashes interchangeably. Some modules require parameters for proper operation. Blacklisted modules can still be loaded explicitly.

HISTORY

modprobe is part of kmod, replacing the older module-init-tools. It provides intelligent module management with automatic dependency resolution.

SEE ALSO

lsmod(8), rmmod(8), insmod(8), modinfo(8), depmod(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid