Removes the specified kernel module from the running kernel
rmmod command is used to remove the specified kernel module from the currently running kernel. Execute the rmmod command to delete unnecessary modules. The core of the Linux operating system has modular characteristics. Therefore, when compiling the core, all functions must be included in the core. You can compile these functions into separate modules and load them separately when needed.
rmmod(options)(parameters)
-v: Display detailed information about command execution;
-f: Forcibly remove the module, using this option is more dangerous;
-w: Wait until the module can be removed before removing the module;
-s: Send error information to the system log (syslog).
Module name: The name of the module to be removed.
The rmmod command is mainly used to uninstall the Linux kernel module in use. It is similar to the modprobe -r
command, as shown below:
[root@localhost boot]# lsmod | grep raid1
raid1 25153 0
[root@localhost boot]# rmmod raid1
[root@localhost boot]# lsmod | grep raid1