Use of rmmod Command in Linux operating system

Rmmod Command in Linux operating system

In this article, we are going to show you that how to Use the rmmod command in Linux. If you want to learn basic of the rmmod command in Linux then this article is ideal for you.

On Linux operating systems, the rmmod command is used to remove a module from the Linux kernel. Mostly users still use modprobe with the -r option instead of using rmmod.

The rmmod command is easy to use. When you run this command in your Linux system, you just need to give it the name of a module that you want to remove from Linux Kernel.

Linux is an operating system, like Windows OS, iOS, and Mac OS. Linux is one of the most popular operating system on the planet, Android is also powered by Linux OS(operating system). An operating system is software that manages all hardware resources associated with desktop or laptop. In simple words, the OS(operating system) manages communication between software and hardware.

Rmmod Command in Linux

In the Linux, the basic syntax of the Rmmod command is show as below:

rmmod [OPTIONS] MODULE_NAME...

Only users with administrative privileged can remove modules from Linux Kernel.

If you want to check all modules loaded on your Linux system then you can use the lsmod command to print list of all loaded modules. In the Linux, the Kernel modules are stored in the  /lib/modules/<kernel_version> directory.

Simply Run the below  rmmod  command with the module name to removing module from kernel :

$ rmmod module_name

The above command display a message only when something goes wrong or this is throw a error. For a example, if another module uses the module that you want to remove, then the command will throw a error message something like below:

rmmod: ERROR: Module module_name is in use by: module_name_another

 Rmmod Command with -v (--verbose) option :

This option display information about what the program is doing.

$ rmmod -v module_name

 Rmmod Command with -f option :

This option remove a module that is being used or not designed to be removed, Simply run the below command with the -f option.

$ rmmod -f module_name

Using this option is very dangerous. It can cause a system crash so be very careful to execute above command.

 Rmmod Command with -s option :

This option is used to send errors to syslog instead of standard error.

$ rmmod -s module_name

That’s all

If you find any error and issue in above steps , please use comment box below to report.

If our tutorials helped you, please consider buying us a coffee. We appreciate your support!

Thank you for your support.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top