rmmod command in Linux with Examples Last Updated : 10 Oct, 2024 Comments Improve Suggest changes Like Article Like Report The rmmod command in Linux is used to remove or unload a module from the kernel. Modules are pieces of code that can be dynamically loaded into the Linux kernel to extend its functionality, such as drivers for hardware devices. When a module is no longer needed, it can be removed using rmmod. Although many users prefer to use the modprobe -r command for removing modules, rmmod directly unloads a module from the kernel.Syntaxrmmod [options] [modulename]where,modulename: The name of the module to be removed.[options]: Various optional flags that modify how rmmod behaves.Basic Examplermmod bluetoothKey Options for the rmmod Command1. rmmod command with help optionIt 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. Example:2. rmmod -vThis option prints messages about what the program is being doing. Usually rmmod only prints messages only if something went wrong. Example:rmmod -v bluetooth3. rmmod -fThis 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 bluetooth4. rmmod -sBy default, error messages are sent to standard error. The -s option redirects error messages to the system log (syslog) instead of displaying them on the terminal. Example:rmmod -s bluetooth5. rmmod -VThis option will going to show version of program and then exit. rmmod -VConclusionThe rmmod command in Linux provides a direct way to unload kernel modules from the system. If you're performing system maintenance, managing drivers, or troubleshooting, understanding how to use rmmod is essential. While the command is powerful, it should be used carefully, especially when forcing the removal of modules. In many cases, using modprobe -r may be safer due to its dependency handling. Comment More infoAdvertise with us R rahulkumarmandal Follow Improve Article Tags : Linux-Unix linux-command Linux-misc-commands Similar Reads read command in Linux with Examples read command in the Linux system is used to read from a file descriptor. This command reads up the total number of bytes from the specified file descriptor into the buffer. If the number or count is zero, this command may detect errors. But on success, it returns the number of bytes read. Zero indic 3 min read readelf command in Linux with Examples When we compile source code, an object file is generated of the program and with the help of linker, this object files gets converted to a binary file which, only the machine can understand. This kind of file follows some structures one of which is ELF(Executable and Linkable Format). And to get the 4 min read readlink command in Linux with Examples The 'readlink' command in Linux is a valuable tool used to print resolved symbolic links or canonical file names. In simpler terms, when dealing with symbolic links and you need to know the actual path they represent, the 'readlink' command reveals the path of the symbolic link. This command is part 3 min read Reboot Linux System Command with Examples Rebooting a Linux system is a fundamental administrative task necessary for applying updates, troubleshooting, or system maintenance. Various commands are available to reboot a Linux system, each with specific options and use cases. This guide explores essential reboot commands such as `reboot`, `sh 11 min read How to Rename File in Linux | rename Command Changing the names of files in Linux is something we often do, and the "rename" command is like a helpful friend for this job. This guide is like a journey to becoming really good at renaming files on Linux, showing you how handy and useful the "rename" command can be. Whether you're just starting o 8 min read reset command in Linux with Examples reset command in the Linux system is used to initialize the terminal. This is useful once a program dies leaving a terminal in an abnormal state. Note that you may have to type reset to get the terminal up and work, as carriage-return may no longer work in the abnormal state. Also, the terminal will 3 min read restore command in Linux with Examples restore command in Linux system is used for restoring files from a backup created using dump. The restore command performs the exact inverse function of dump. A full backup of a file system is being restored and subsequent incremental backups layered is being kept on top of it. Single files and dire 5 min read return command in Linux with examples return command is used to exit from a shell function. It takes a parameter [N], if N is mentioned then it returns [N] and if N is not mentioned then it returns the status of the last command executed within the function or script. N can only be a numeric value. The return command is especially usefu 2 min read rev command in Linux with Examples rev command in Linux is used to reverse the lines characterwise. This utility reverses the order of the characters in each line by copying the specified files to the standard output. If no files are specified, then the standard input will be read. Here, we will explore the syntax, examples, and opti 3 min read rm command in Linux with examples rm stands for remove here. rm command is used to remove objects such as files, directories, symbolic links and so on from the file system like UNIX. To be more precise, rm removes references to objects from the filesystem, where those objects might have had multiple references (for example, a file w 5 min read Like