Linux command
insmod 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Insert
sudo insmod path/to/module.ko
Example
sudo insmod path/to/module.ko param=value
说明
insmod is a simple program to insert a module into the Linux kernel. It requires the full path to the module file. Unlike modprobe, insmod does not handle dependencies automatically.
参数
- -f, --force
- Disable kernel version and vermagic checks. Dangerous: can cause memory corruption or crashes.
- --force-modversion
- Ignore module version symbol mismatches.
- --force-vermagic
- Ignore vermagic string mismatches.
- -s, --syslog
- Send error messages to syslog instead of stderr.
- -v, --verbose
- Print detailed information about what insmod is doing.
- -V, --version
- Show program version and exit.
- -h, --help
- Show help and exit.
FAQ
What is the insmod command used for?
insmod is a simple program to insert a module into the Linux kernel. It requires the full path to the module file. Unlike modprobe, insmod does not handle dependencies automatically.
How do I run a basic insmod example?
Run `sudo insmod path/to/module.ko` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --force do in insmod?
Disable kernel version and vermagic checks. Dangerous: can cause memory corruption or crashes.