XK0-005 · Question #167
A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?
The correct answer is D. modprobe -r. The systems administrator wants to remove unused kernel modules that were autoloaded but are no longer necessary.
Question
A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?
Options
- Armmod -c
- Bdepmod -r
- Cinsmod -c
- Dmodprobe -r
How the community answered
(60 responses)- A2% (1)
- B3% (2)
- C2% (1)
- D93% (56)
Why each option
The systems administrator wants to remove unused kernel modules that were autoloaded but are no longer necessary.
`rmmod` is used to remove a single module, but the `-c` option is not a standard or recognized flag for this command.
`depmod` is used to generate or verify kernel module dependency information, which is used by `modprobe` and `insmod`, not to remove modules. The `-r` option for `depmod` is typically used to rebuild module dependency files.
`insmod` is used to insert a single module into the Linux kernel, which is the opposite of removing modules. The `-c` option is not a standard or recognized flag for `insmod`.
The `modprobe -r` command is used to remove a specified module from the Linux kernel, along with any other modules that depend on it but are no longer used by anything else. This makes it effective for cleaning up autoloaded and currently unused modules.
Concept tested: Removing kernel modules
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/kernel_administration_guide/chap-managing-modules
Topics
Community Discussion
No community discussion yet for this question.