CompTIA Linux+ (XK0-004) — Question 281
The grub2-mkconfig command is used to generate a new GRUB2 configuration after:
Answer options
- A. resizing the /boot filesystem.
- B. changing the /etc/default/grub file.
- C. changing the /boot/grub2/grub.cfg file.
- D. installing new software from a package.
Correct answer: B
Explanation
The correct answer is B because the grub2-mkconfig command is specifically designed to regenerate the GRUB2 configuration when changes are made to the /etc/default/grub file. Options A and D do not directly relate to GRUB2 configuration changes, while C is incorrect because changes to /boot/grub2/grub.cfg should not be manually edited.