kmod
Manage Linux kernel modules
TLDR
List currently loaded kernel modules
Display the static device nodes information provided by the modules of the currently running kernel
SYNOPSIS
kmod [OPTIONS] COMMAND [ARGUMENTS...]
The kmod binary acts as a multi-call binary. When invoked directly, it processes general options before delegating to the specified COMMAND (e.g., modprobe, insmod, rmmod). More commonly, its symlinked names are used directly.
PARAMETERS
--help
Displays a help message for the kmod command itself and exits.
--version
Prints the version of the kmod package and exits.
DESCRIPTION
kmod is a collection of utilities designed for managing Linux kernel modules and associated configuration files. It provides a unified interface for loading, unloading, listing, and querying information about kernel modules, as well as resolving their dependencies.
The kmod package replaced the older module-init-tools project, offering a more modern and robust solution for dynamic kernel functionality management. While kmod itself serves as a multi-call binary, users typically interact with its symlinked components such as modprobe, insmod, rmmod, lsmod, depmod, and modinfo. These tools are fundamental for system boot processes (e.g., via initramfs) and for on-demand loading of hardware drivers and kernel features.
CAVEATS
Most operations modifying kernel state (e.g., loading/unloading modules) require root privileges.
Improper handling of kernel modules can lead to system instability or crashes.
The primary user interaction is through sub-commands like modprobe, not the kmod command itself directly, though kmod is the underlying binary.
MULTI-CALL BINARY DESIGN
The kmod executable is designed as a multi-call binary. This means that various commands like modprobe, insmod, and rmmod are actually symlinks to the single kmod binary. When invoked, the kmod binary inspects the name by which it was called (e.g., argv[0]) to determine which specific tool's functionality to execute. This approach helps reduce disk space and simplifies package management.
HISTORY
The kmod project was initiated around 2011-2012, primarily to replace the older module-init-tools package. It aimed to provide a more modern, robust, and unified set of tools for kernel module management, offering better integration with contemporary Linux system components like systemd. Its development brought improved dependency resolution, configuration handling, and overall reliability for managing dynamically loaded kernel functionalities.