[email protected]Office hours: Mon – Fri 9:00AM – 5:00PMLinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedAugust 14, 2023

How to use rmmod command.

How To Use Rmmod Command.

In this article, we’ll talk about how to use the rmmod command to remove modules from the Linux Kernel.

The core component of each Linux operating system is the Linux kernel. It manages the system’s resources, and acts as an intermediary between the computer’s hardware and software.

 

rmmod Command

The general syntax for the rmmod (remove module) command is as follows:

rmmod [OPTIONS] MODULE_NAME...

On modern Linux systems, rmmod is part of kmod, a binary that implements multiple programs used to manage Linux kernel modules.

Only users with administrative privileged can remove modules.

You can print a list of all modules loaded on your system with the lsmod command. The Kernel modules are stored in the /lib/modules/<kernel_version> directory.

Removing a module with the rmmod command is pretty simple; simply invoke the command followed by the module name:

rmmod module_name

The command prints message only if something goes wrong. For example, if another module uses the module, the command will print something like this:

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

To display information about what the command is doing, use the -v (–verbose) option.

If you want to remove a module that is being used or not designed to be removed, invoke the command with the -f (–verbose) option. Using this option is extremely dangerous as it can cause a system crash.

rmmod also accepts multiple modules as arguments:

rmmod module_name1 module_name2

 

Prevent a Kernel Module from Loading at Boot-Time

When a module is removed using the rmmod command, the module remains unloaded until the system is rebooted. On the next system boot, the removed module will be loaded.

To permanently disable a Kernel module from loading at boot-time, create a .conf file with any name inside the /etc/modprobe.d. The syntax is:

/etc/modprobe.d/blacklist.conf
blacklist module_name

If you want to blacklist additional modules, specify the modules on a new line, or create a new .conf file.

If you want to blacklist additional modules, specify the modules on a new line, or create a new .conf file.

 

Conclusion

The rmmod command is used to remove Linux kernel modules. Generally, most Linux users are using the modprobe -r command instead of rmmod.

Keep reading
How to Implement Network Segmentation and Resource Isolation in Linux.
February 6, 2024

How to Implement Network Segmentation and Resource Isolation in Linux.

How to Implement Network Segmentation and Resource Isolation in Linux. Securing and managing networks in a Linux environment involves advanced practices like network segmentation and resource isolation. This guide explores these concepts, providing detailed instructions and examples for…

Read article
How to open or close ports in Linux.
February 6, 2024

How to open or close ports in Linux.

How to open or close ports in Linux. Effectively managing ports on your Linux system is crucial for both security and service accessibility. This comprehensive guide will provide a detailed walkthrough on opening and closing ports using the robust tools iptables and ufw. Understanding these…

Read article
How to use ypdomainname command.
January 23, 2024

How to use ypdomainname command.

How to use ypdomainname command. In the realm of Linux networking, the ypdomainname command plays a crucial role in the context of the Network Information Service (NIS). NIS, formerly known as Yellow Pages, is a distributed database service that facilitates the sharing of network configuration and…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, colocation, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Office hours: Mon – Fri 9:00AM – 5:00PM