LFCS Service Configuration Practice Question
After editing a service unit file, which command must be run for changes to take effect?
⚠ Common exam trap
Candidates often confuse restarting the service (which affects the running process) with reloading the systemd daemon (which updates the unit definition cache), leading them to choose `systemctl restart` instead of `systemctl daemon-reload`.
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 daemon-reload
When a service unit file is edited, systemd must be notified to reload its configuration from disk. The `systemctl daemon-reload` command instructs systemd to re-read all unit files, applying any changes to the unit definitions without requiring a full system reboot. This is necessary because systemd caches unit file contents in memory, and only a daemon-reload will update that cache.
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 restart <service>
Why it's wrong here
restart stops and starts the service using systemd's cached unit definition, so the edited file is not re-read; a daemon-reload must precede it. It would be correct after a daemon-reload when the service's process itself needs to pick up changed ExecStart arguments.
- ✓
systemctl daemon-reload
Why this is correct
`systemctl daemon-reload` forces systemd to re-read all unit files and rebuild its dependency tree, so the edited service definition is picked up without a reboot. Running `systemctl restart` alone reuses the cached unit, leaving your changes ignored. This satisfies the stem's requirement that modifications take effect.
- ✗
systemctl reenable <service>
Why it's wrong here
reenable only re-creates the symlinks under /etc/systemd/system based on the [Install] section; it does not reload the modified unit definition into the running systemd manager. It would be correct after changing WantedBy or adding an install target so the service starts at boot.
- ✗
systemctl reload <service>
Why it's wrong here
reload re-reads the service's own configuration files without restarting the process; it does not re-parse the unit file itself, so edits to ExecStart or dependencies are ignored. It would be correct after changing an application config that the running daemon can reload, such as nginx.conf.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-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 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.