rmmod command in Linux with Examples

rmmod command in Linux system is used to remove a module from the kernel. Most of the users still use modprobe with the -r option instead of using rmmod.

Syntax:

rmmod [-f] [-s] [-v] [modulename]

Example:

rmmod bluetooth

Options:

  • rmmod command with help option: It will print the general syntax of the rmmod along with the various options that can be used with the rmmod command as well as gives a brief description about each option.

  • rmmod -v: This option prints messages about what the program is being doing. Usually rmmod only prints messages only if something went wrong.

    Example:

    rmmod -v bluetooth

  • rmmod -f: This option can be extremely dangerous. It takes no effect unless CONFIG_MODULE_FORCE_UNLOAD is being set when the kernel was compiled. With this option, you can remove the specified modules which are being used, or which are not being designed to be removed or have been marked as not safe.

    Example:

    sudo rmmod -f bluetooth

  • rmmod -s : This option is going to send errors to syslog instead of standard error.

    Example:

    rmmod -s bluetooth

  • rmmod -V : This option will going to show version of program and then exit.
    rmmod -V



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.