XK0-006 Services and User Management Practice Question
A Linux administrator needs to ensure that a custom application service, implemented as a oneshot systemd unit, runs only after the network is fully online and the /data filesystem is mounted. The unit file currently has no ordering directives. Which systemd directive should be added to the [Unit] section to define these ordering dependencies?
⚠ Common exam trap
Many candidates confuse requirement dependencies (Requires=, Wants=) with ordering dependencies (After=, Before=), leading to a service that starts too early despite being configured to depend on network and storage.
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=network-online.target data.mount
Ordering dependencies in systemd are expressed with After= or Before=. After= ensures that the units listed are fully activated before the service starts. While Requires= or Wants= pull units into the transaction, they do not delay activation. For a oneshot service that must wait for network-online.target and data.mount, After= is the correct directive to add to the [Unit] section.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Wants=network-online.target data.mount
Why it's wrong here
Wants= adds a weak requirement that pulls in the listed units if they are not already started, but it does not enforce ordering. The service could still start concurrently with or before the network and mount units become active, so it does not guarantee the desired sequence.
- ✗
Requires=network-online.target data.mount
Why it's wrong here
Requires= creates a hard dependency but does not control ordering. If network-online.target or data.mount fails, the service will not start, but if they are slow to activate, the service may still start before they are ready. The administrator needs ordering, not just requirement, so this directive alone is insufficient.
- ✗
Before=network-online.target data.mount
Why it's wrong here
Before= does the opposite: it orders the service to start before the listed units. That would cause the application to run before the network and /data are ready, likely leading to failures. The administrator needs the service to start after those targets, not before.
- ✓
After=network-online.target data.mount
Why this is correct
After= establishes ordering: the listed units must be activated before this service starts. It does not pull them in, but if they are already scheduled to start (e.g., via Wants= or Requires= elsewhere), the service will wait. This matches the requirement to run only after the network and filesystem are online.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
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
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
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.