Aug 10

rmmod

Tag: Essential Commands, LinuxVlogcanic @ 3:28 pm

The program rmmod is an essential system administration command in Linux used to unload a loadable module from a running kernel. In order to succeed the module to be removed must meet two conditions:

  • it must not be in use by the system
  • it must no be in use by any other module.

For instance, if NDISWrapper is running as a loaded module on your kernel you can remove it by typing

rmmod ndiswrapper

as a root or

sudo rmmod ndiswrapper

as some other user.

The same thing can be done by using the modprobe command with the remove option –ultimately, modprobe calls rmmod to do the trick.

modprobe -r ndiswrapper

How to remove a module in use.

If a module is in current use it can’t be removed immediatly but rmmod can be called in waiting mode in order to block new access requests from any running process and then have it unloaded when it’s no longer in use. The waiting option can be called either by

rmmod -w modulename

or

rmmod --wait modulename

2 Responses to “rmmod”

  1. Vlogcanic » How to install an Encore ENUWI-G2 USB WiFi adapter in Ubuntu 6.10 Edgy Eft says:

    […] rmmod […]

  2. Vlogcanic » modprobe says:

    […] removes modules by calling the rmmod program, which you can also use […]

Leave a Reply