XK0-006 System Management Practice Question
An administrator manages a server with several systemd services. A service named reportgen.service must not start until another service named dbengine.service is fully active, and reportgen should be stopped automatically if dbengine stops. Which directive combination in the reportgen.service unit file achieves this ordering and dependency?
⚠ Common exam trap
The trap here is assuming a single directive like Requires handles both ordering and shutdown coupling, when systemd separates ordering from dependency semantics.
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
✓
After=dbengine.service and Requires=dbengine.service
Ordering and dependency are separate concerns in systemd. After= controls sequence, ensuring reportgen starts once dbengine is active, while Requires= creates a hard dependency so reportgen stops if dbengine stops. Using After= with Requires= satisfies both requirements. Wants= is too weak to force the stop behavior, and Before= would invert the required startup order.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
After=dbengine.service and Wants=dbengine.service
Why it's wrong here
After= correctly sequences reportgen behind dbengine, but Wants= only expresses a preference to start dbengine and does not stop reportgen if dbengine goes down. To satisfy the automatic-stop requirement, a stronger dependency such as Requires= is needed, so this pairing is incomplete for the stated scenario.
- ✗
Before=dbengine.service and Wants=dbengine.service
Why it's wrong here
Before= would order reportgen ahead of dbengine, the opposite of the requirement. Wants= is a weak dependency that does not stop reportgen when dbengine stops, and it does not enforce activation ordering by itself. This combination would let reportgen run before or independently of dbengine, which is incorrect here.
- ✗
Requires=dbengine.service and Before=dbengine.service
Why it's wrong here
Requires= does create a hard dependency, but Before= reverses the ordering so reportgen is scheduled before dbengine. That contradicts the requirement that reportgen wait until dbengine is active. The ordering directive must be After=, not Before=, making this combination wrong.
- ✓
After=dbengine.service and Requires=dbengine.service
Why this is correct
After= establishes ordering so reportgen starts only once dbengine has been activated, and Requires= creates a hard dependency so that if dbengine is stopped or fails, reportgen is also stopped. Together they express both the sequence and the lifecycle coupling the administrator described for these two units.
Go deeper
Related to this question
Learn chapter
Managing Storage and File Systems
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Dependency
A dependency is a piece of software, library, or package that another software application requires in order to function correctly.
About these practice questions
This XK0-006 question is part of Courseiva's 781-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 CompTIA exam blueprint
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.