LFCS Service Configuration Practice Question
A Linux administrator needs to modify the default runlevel (target) on a systemd-based Linux server so that it boots into a graphical environment by default. Which command should the administrator use?
⚠ Common exam trap
Candidates often confuse the immediate effect of isolating a target with the persistent change of setting the default target, leading to a temporary switch that does not survive a reboot.
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
✓
systemctl set-default graphical.target
The default systemd target is controlled by the /etc/systemd/system/default.target symlink. The systemctl set-default command is the official way to change this symlink to point to the desired target, such as graphical.target for a graphical boot. Unlike isolate, which only changes the current state, set-default persists across reboots. Using enable is incorrect because it does not alter the default.target symlink. Manual symlink creation is possible but not the recommended practice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
systemctl enable graphical.target
Why it's wrong here
Enabling a target only ensures that the target is started when its dependencies are met; it does not set it as the default boot target. The default target is determined by the default.target symlink. Enabling graphical.target alone will not change the default runlevel, so this command does not achieve the desired outcome.
- ✗
ln -sf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target
Why it's wrong here
Manually creating a symlink is technically possible, but it is not the recommended method. systemctl set-default is the proper tool because it performs the same action and also triggers any necessary reloads. Using ln directly may work, but it bypasses systemd's management and could lead to inconsistencies. The exam expects knowledge of the correct command.
- ✗
systemctl isolate graphical.target
Why it's wrong here
This command immediately switches the running system to the graphical target, but it does not change the default boot target. After a reboot, the system will revert to the previously configured default target. While it achieves a temporary switch, it does not satisfy the requirement of changing the default runlevel for future boots.
- ✓
systemctl set-default graphical.target
Why this is correct
This command sets the default boot target to graphical.target by creating a symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target. It ensures that on the next boot, the system will start the graphical environment. This is the correct and recommended method for changing the default runlevel on systemd systems.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.