Linux insmod Command
The Linux insmod (short for "install module") command is used to load modules.
Linux has many features that are implemented as modules, which are loaded into the kernel on demand. This approach keeps the kernel lean, improves efficiency, and maintains flexibility. These loadable modules are typically device drivers.
Syntax
insmod [-fkmpsvxX][-o <module name>][module file][symbol name = symbol value]
Parameter Description:
-f: Do not check if the current kernel version matches the kernel version the module was compiled for; forcefully load the module.
-k: Set the module to be automatically unloaded.
-m: Output module loading information.
-o <module name>: Specify the name of the module, which can be the filename of the module file.
-p: Test if the module can be loaded correctly into the kernel.
-s: Log all messages to the system log file.
-v: Display detailed information during execution.
-x: Do not export the module's external symbols.
-X: Export all external symbols of the module, which is the default setting.
Example
Load a module
# insmod led.o
// Load the module into the kernel