Courseiva
System ManagementmediumMultiple ChoiceObjective-mapped

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.

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 →

How Courseiva writes practice questions · Editorial policy

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.