$linuxjunkies
>

kmod(8)

Load and unload Linux kernel modules with a unified interface for modprobe, insmod, rmmod, and lsmod functionality.

UbuntuDebianFedoraArch

Synopsis

kmod [OPTION]... COMMAND [COMMAND_OPTION]...

Description

kmod is a tool and library for managing Linux kernel modules. It provides a single unified interface to replace the traditional modprobe, insmod, rmmod, and lsmod commands. kmod can load modules into the kernel, unload them, list loaded modules, and manage module dependencies.

The command operates on kernel modules stored in /lib/modules/$(uname -r)/ and uses depmod-generated dependency information to automatically load required modules. It supports module parameters, blacklisting, and configuration via /etc/modprobe.d/ files.

Common options

FlagWhat it does
-h, --helpDisplay help message and exit
-V, --versionShow version information
-q, --quietPrint no messages
-v, --verboseIncrease verbosity (can be used multiple times)
-n, --dry-runTest mode; do not actually load or unload modules
-f, --forceForce load/unload even if conflicts detected
-r, --removeRemove modules instead of inserting them
-s, --syslogLog messages to syslog
-C, --configSpecify alternate configuration directory

Examples

Load the usb_storage module and any required dependencies

kmod load usb_storage

Unload the usbcore module if no other modules depend on it

kmod remove usbcore

Display all currently loaded kernel modules

kmod list

Load the e1000 network driver with the speed parameter set to 1000

kmod load e1000 speed=1000

Force unload the nvidia module even if conflicts exist

kmod remove -f nvidia

Test loading the ath9k module without actually loading it

kmod load --dry-run ath9k

Load the nouveau module with verbose output

kmod -v load nouveau

Generate static device nodes from loaded kernel modules

kmod static-nodes

Related commands