XK0-006 System Management Practice Question
After making changes to /etc/grub.d/ and /etc/default/grub, an administrator needs to regenerate the GRUB2 configuration file. Which command should be used?
⚠ Common exam trap
Test-takers frequently confuse `grub2-mkconfig` with `grub2-install` or `update-grub`, or assume any command with 'grub' in the name will update the configuration, but only `grub2-mkconfig -o` actually rebuilds the file from the source scripts and defaults.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
grub2-mkconfig -o /boot/grub2/grub.cfg
After modifying /etc/grub.d/ scripts or /etc/default/grub, the GRUB2 configuration file must be regenerated to apply the changes. The command `grub2-mkconfig -o /boot/grub2/grub.cfg` reads the configuration snippets and defaults, then writes the final boot menu configuration to the specified output file. This is the standard method on RHEL/CentOS 7+ and other distributions using GRUB2.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
grub2-install
Why it's wrong here
Installs GRUB to disk, not update config.
- ✗
grub2-set-default 0
Why it's wrong here
Sets default entry, does not regenerate config.
- ✓
grub2-mkconfig -o /boot/grub2/grub.cfg
Why this is correct
Correct: regenerates grub.cfg.
- ✗
update-grub
Why it's wrong here
Debian-specific; not on all distros.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
GRUB
GRUB (Grand Unified Bootloader) is a boot loader package that loads and manages the operating system startup process on Linux and other Unix-like systems.
Key term
Output
In IT service management, output is the result or deliverable produced by a process, system, or component, such as data, reports, or services delivered to a customer.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.