XK0-004 · Question #471
A Linux administrator wants to load the KVM module into the kernel. Which of the following commands should the administrator use?
The correct answer is A. modporbe kvm. modprobe is the correct command to load a kernel module because it automatically resolves and loads any module dependencies.
Question
A Linux administrator wants to load the KVM module into the kernel. Which of the following commands should the administrator use?
Options
- Amodporbe kvm
- Brmmod kvm
- Cinsmod kvm
- Ddepmod kvm
How the community answered
(28 responses)- A93% (26)
- B4% (1)
- C4% (1)
Why each option
modprobe is the correct command to load a kernel module because it automatically resolves and loads any module dependencies.
modprobe kvm reads /lib/modules and the modules.dep file to identify all modules that kvm depends on (such as kvm_intel or kvm_amd), loads them in the correct order, and then loads the kvm module itself - making it the recommended tool for interactive and scripted module loading.
rmmod is used to remove (unload) a currently loaded module from the running kernel, which is the opposite of what is needed here.
insmod inserts a single module file directly without resolving dependencies, so if kvm's prerequisite modules are not already loaded, the command will fail with an error.
depmod generates or updates the module dependency map files used by modprobe; it does not load any module into the running kernel.
Concept tested: Loading kernel modules with dependency resolution using modprobe
Source: https://man7.org/linux/man-pages/man8/modprobe.8.html
Topics
Community Discussion
No community discussion yet for this question.