Which command can both load and unload kernel modules?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that can both load and unload kernel modules is modprobe. This command is specifically designed for handling loadable kernel modules in Linux. When you use modprobe, it not only inserts a specified module into the kernel but also takes care of any dependencies that the module might have. This means that if the module you’re trying to load depends on other modules, modprobe will load those modules automatically.

Moreover, modprobe is capable of removing modules from the kernel as well, which allows it to effectively unload modules when necessary. This dual functionality makes it a versatile tool in managing kernel modules, unlike other commands that are more limited in scope.

Commands like lsmod are useful for listing all currently loaded modules but do not have the capability to load or unload modules. lspci is utilized for listing PCI devices and does not pertain to kernel module management. Ioping is used for measuring I/O latency for block devices and does not interact with kernel modules either. Thus, modprobe stands out as the correct choice for both loading and unloading kernel modules.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy