LFCS Service Configuration Practice Question
A system administrator is troubleshooting a custom systemd service that fails to start. They want to override a setting in the service's unit file without modifying the original file in /usr/lib/systemd/system/. Which two methods can be used to create a drop-in override? (Choose two.)
⚠ Common exam trap
The trap here is thinking that copying the entire unit file to /etc/systemd/system/ is the same as a drop-in override, when it actually replaces the unit and can cause update conflicts.
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
✓
Create a file in /etc/systemd/system/<service>.service.d/ with a .conf extension.
The two correct methods are creating a drop-in directory with a .conf file and using systemctl edit. Both place overrides in /etc/systemd/system/<service>.service.d/ and are applied after daemon-reload. They preserve the original unit file and are the intended way to customize services without conflicting with package updates. Other methods either replace the unit, mask it, or modify vendor files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Edit the unit file directly in /usr/lib/systemd/system/ and run systemctl daemon-reload.
Why it's wrong here
Editing the vendor unit file in /usr/lib/systemd/system/ is discouraged because package updates may overwrite changes. It also does not create a drop-in override; it modifies the original. While daemon-reload would apply changes, this method is not a recommended override technique and can lead to configuration drift or loss of customizations.
- ✓
Create a file in /etc/systemd/system/<service>.service.d/ with a .conf extension.
Why this is correct
Drop-in directories under /etc/systemd/system/<service>.service.d/ are read by systemd and override the original unit file. Files with a .conf extension in this directory are automatically included. This method is recommended for local overrides because it does not touch the vendor-provided unit file and survives package updates.
- ✗
Copy the original unit file to /etc/systemd/system/ and edit it there.
Why it's wrong here
Copying the entire unit file to /etc/systemd/system/ replaces the original unit, which can cause issues when the package is updated because the new version in /usr/lib/systemd/system/ will be shadowed. This method does not create a drop-in override; it creates a full override that must be maintained manually. It is not recommended for minor changes.
- ✓
Run systemctl edit <service>.service and add directives in the editor.
Why this is correct
systemctl edit <service>.service opens an editor to create or modify a drop-in file in /etc/systemd/system/<service>.service.d/. This is the standard interactive way to create overrides. It ensures the correct directory and file naming, and then reloads systemd. It is safe and avoids manual file creation errors.
- ✗
Use systemctl mask <service>.service to create an override.
Why it's wrong here
systemctl mask creates a symlink to /dev/null, preventing the service from starting at all. It is not an override mechanism; it disables the unit entirely. This would not allow the administrator to change a setting and start the service. Masking is used to completely block a unit, not to modify its configuration.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
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.