Open In App

rmmod command in Linux with Examples

Improve
Improve
Like Article
Like
Save
Share
Report

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


Last Updated : 24 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads