220-1102 Operating Systems Practice Question
A user reports that a Ubuntu Linux workstation boots to a command-line prompt instead of the graphical desktop after a recent package update. The technician wants to check which systemd target is currently active and switch to the graphical environment without rebooting. Which sequence of commands should the technician use?
⚠ Common exam trap
Many candidates confuse the persistent default target with the currently active target, where only isolate changes the running state immediately.
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 list-units --type=target, then systemctl isolate graphical.target
Listing active targets identifies the current systemd state, and isolating graphical.target transitions the running system into the graphical environment right away. This satisfies the requirement to switch without rebooting, and the default target can be corrected separately if the change needs to survive a restart.
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 list-units --type=target, then systemctl isolate graphical.target
Why this is correct
Listing target units shows which targets are active, revealing whether the system is in multi-user.target rather than graphical.target. Isolating graphical.target then starts the display manager and desktop environment immediately in the running session, restoring the GUI without a reboot. The technician can subsequently set the default target if the change should persist.
- ✗
systemctl get-default, then systemctl set-default graphical.target
Why it's wrong here
systemctl get-default reports the default target that will be used on the next boot, and set-default changes it persistently. Neither command changes the currently running target, so the user would still be at the command line until a reboot. The scenario requires an immediate switch in the running session, which this pair does not provide.
- ✗
systemctl isolate multi-user.target, then reboot
Why it's wrong here
Isolating multi-user.target stops the graphical environment and leaves the system in a text-only state, which is the opposite of the goal. Rebooting afterward returns the system to whatever default target is configured, so this sequence neither diagnoses the current state nor restores the desktop in the running session.
- ✗
systemctl status graphical.target, then systemctl restart gdm
Why it's wrong here
Checking the status of graphical.target shows whether it is active or inactive, which is useful information, but restarting the display manager does not start the graphical target if it was never activated. If the system booted to multi-user.target, gdm may not be enabled, so restarting it fails or exits immediately, leaving the user at the command line.
Go deeper
Related to this question
About these practice questions
One of 687 original 220-1202 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 CompTIA exam blueprint
This 220-1202 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 220-1202 exam.