LFCS Service Configuration Practice Question
A service unit file includes the following: [Install] WantedBy=multi-user.target. What does this directive accomplish?
⚠ Common exam trap
Candidates often confuse the declarative `WantedBy` directive with an immediate start action (Option C), when in fact it only defines a dependency relationship that takes effect after the service is enabled via symlinking.
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
✓
The service is enabled by symlinking in multi-user.target.wants.
The `WantedBy=multi-user.target` directive in the `[Install]` section of a systemd service unit file does not directly start the service when the target is entered. Instead, when the service is enabled (via `systemctl enable`), systemd creates a symbolic link from the service unit file into the `multi-user.target.wants/` directory. This symlink causes systemd to automatically start the service as a dependency when `multi-user.target` is activated, effectively enabling the service for that target.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The service is stopped when multi-user.target is stopped.
Why it's wrong here
WantedBy does not cause stopping; it creates a soft dependency.
- ✗
The service conflicts with multi-user.target.
Why it's wrong here
WantedBy does not create a conflict.
- ✗
The service is automatically started when the system enters multi-user.target.
Why it's wrong here
This is true for enabled services, but WantedBy itself does not start the service; it enables it.
- ✓
The service is enabled by symlinking in multi-user.target.wants.
Why this is correct
WantedBy= creates a symlink in the .wants directory of the target when the service is enabled.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 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 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.