LPIC-1 Linux Installation and Package Management Practice Question
Network Topology
Refer to the exhibit. After modifying /etc/default/grub to enable serial console output, which command must be run to apply the changes to the GRUB configuration?
⚠ Common exam trap
It's easy for candidates to confuse commands that modify GRUB's runtime behavior (like `grub-set-default` or `grub-editenv`) with the command that regenerates the static configuration file from the template, leading them to pick a wrong option that does not actually apply changes from `/etc/default/grub`.
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
✓
update-grub
The correct command is `update-grub` (or its equivalent `grub-mkconfig -o /boot/grub/grub.cfg`). After modifying `/etc/default/grub`, you must regenerate the GRUB configuration file (`grub.cfg`) to incorporate the new serial console settings. `update-grub` is a wrapper that runs `grub-mkconfig` and writes the output to the correct location, applying the changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
grub-editenv
Why it's wrong here
grub-editenv edits the small saved-environment block storing variables such as boot entry and next_entry; it does not rebuild grub.cfg from /etc/default/grub. It is tempting as a GRUB configuration tool, and would be correct for changing the default boot entry at runtime.
- ✗
grub-install
Why it's wrong here
grub-install writes bootloader files to a disk's boot sector or EFI partition; it does not regenerate grub.cfg from /etc/default/grub. It is tempting because both concern GRUB, and would be correct when reinstalling the bootloader after disk or firmware changes.
- ✗
grub-set-default
Why it's wrong here
grub-set-default only sets the default boot entry; it does not regenerate grub.cfg, so the serial console edits never reach the bootloader. It is tempting because it does write GRUB state, and it would be correct for changing which menu entry boots by default.
- ✓
update-grub
Why this is correct
Running `update-grub` regenerates `/boot/grub/grub.cfg` from `/etc/default/grub` and the scripts in `/etc/grub.d/`, so the serial console parameters take effect on the next boot. On Debian-based systems this wrapper invokes `grub-mkconfig -o /boot/grub/grub.cfg`, satisfying the stem's requirement to apply the edits.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 402-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.