Linux insmod Command
The Linux insmod (full English spelling: install module) command is used to load modules.
Many Linux features are implemented as modules that are loaded into the kernel only when needed. This keeps the kernel lean, thereby improving efficiency and maintaining greater flexibility. Such loadable modules are usually device drivers.
Syntax
insmod [-fkmpsvxX][-o <模块名称>][模块文件][符号名称 = 符号值]
Parameter Description:
- -f Do not check whether the current kernel version matches the version the module was compiled against; force the module to load.
- -k Set the module to be automatically unloaded.
- -m Output information about the module loading.
- -o
Specify the name of the module; the filename of the module file can be used. - -p Test whether the module can be loaded into the kernel correctly.
- -s Log all information 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; this is the default.
Example
Load the module
# insmod led.o
//Load module into kernel
Linux Command Reference