Linux+ Exam: Cleaning Up Autoloaded Device Modules | CompTIA Exam Preparation

Cleaning Up Autoloaded Device Modules

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?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

http://ccrma.stanford.edu/planetccrma/man/man8/modprobe.8.html

The correct answer to the question is D. modprobe -r.

Explanation:

The command modprobe is used to add or remove a module from the Linux kernel. The -r option is used to remove a module. When a module is removed, any devices that were associated with it will be unbound from the module and made available for other modules to use.

Option A (rmmod -c) is incorrect because the -c option is used to display information about the module's use count, which is not relevant to removing unused modules.

Option B (depmod -r) is incorrect because the depmod command is used to generate a list of module dependencies, not to remove modules.

Option C (insmod -c) is incorrect because the insmod command is used to insert a module into the kernel, not to remove modules.

Therefore, the correct answer is D (modprobe -r) as it removes a module from the Linux kernel.