hardMultiple SelectObjective-mapped
XK0-006 Practice Question: A Linux administrator needs to configure a…
A Linux administrator needs to configure a service to start automatically after a network connection is established. The service should only run when the network is up, and should stop when the network goes down. Which two systemd unit options should be used? (Choose two.)
⚠ Common exam trap
A common mix-up: candidates confuse BindsTo= with Requires=, thinking both ensure the service stops when the network fails, but only BindsTo= enforces automatic stopping, while Requires= only ensures startup ordering without lifecycle coupling.
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
✓
BindsTo=network.target
(BindsTo=network.target) is correct because it creates a stronger dependency than Requires: if the network target stops, systemd will stop the service as well, ensuring the service only runs when the network is up. Option E (After=network.target) is correct because it orders the service to start only after the network target has been reached, preventing the service from attempting to start before the network is available.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Requires=network.target
Why it's wrong here
Requires does not enforce ordering; service may start before network.
- ✗
PartOf=network.service
Why it's wrong here
PartOf is used for resource bundling, not lifecycle dependency.
- ✓
BindsTo=network.target
Why this is correct
BindsTo ties service lifecycle to network; if network stops, service stops.
- ✗
Wants=network.target
Why it's wrong here
Wants is weaker; network failure does not prevent service start.
- ✓
After=network.target
Why this is correct
Ensures service starts after network target is reached.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Dependency
A dependency is a piece of software, library, or package that another software application requires in order to function correctly.
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.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 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.