Disable ads (and more) with a premium pass for a one time $4.99 payment
The command used to remove a module from the Linux kernel is "rmmod." This command specifically targets loaded kernel modules and safely removes them from the operating system. When a module is unloaded, any resources it was using are released, and it can no longer be called upon by the kernel or any applications running in the kernel space.
In contrast, the other commands listed have different purposes. "lsmod" is used to list all the currently loaded kernel modules, providing insight into what is presently active within the system. "modinfo" displays detailed information about a specified kernel module, such as its version and parameters, but does not affect the loading or unloading of modules. "modprobe" is typically used to add or remove modules as well, but it also handles module dependencies and is more often used for loading modules into the kernel rather than explicitly removing them.
Therefore, "rmmod" is the most direct and correct choice for the task of removing a module from the Linux kernel, making it the appropriate answer.