Linux insmod command

Linux 命令大全Linux Command Collection

Linux insmod (full English spelling: install module) command is used to load modules.

Linux has many functions implemented in the form of modules, which are loaded into the kernel only when needed. This keeps the kernel more compact, improves efficiency, and maintains 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 kernel version at module compile time; force the module to be loaded.
  • -k Set the module to be automatically removed.
  • -m Output module loading information.
  • -o<module name> Specify the name of the module; you can use the file name of the module file.
  • -p Test whether the module can be correctly loaded into the kernel.
  • -s Record all information in 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.

Examples

Load module

# insmod led.o 

//向内核加载模块

Linux 命令大全Linux Command Collection

Other extensions