LFCS Operation of Running Systems Practice Question
Which THREE steps are necessary to permanently disable a systemd service from starting at boot?
⚠ Common exam trap
The trap is that candidates often think `systemctl disable` alone is sufficient to prevent a service from starting at boot, but they overlook that dependencies or manual start can re-enable it. Masking (`systemctl mask`) is necessary to completely prevent the service from being started. Also, `systemctl stop` is not required for the goal of disabling boot start—it only affects the current session.
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 mask myapp.service
To permanently prevent a systemd service from starting at boot, two steps are necessary: disable it (`systemctl disable`) to remove the symbolic links that cause it to start on boot, and mask it (`systemctl mask`) to prevent manual or dependency-based activation. Stopping the service (`systemctl stop`) is optional and does not affect its boot behavior; it only stops the current running instance. Therefore, only disable and mask are required to permanently disable the service from booting.
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 stop myapp.service
Why it's wrong here
Incorrect. `systemctl stop` stops the service if it's currently running, but it does not affect whether the service starts at boot. It is not a necessary step for permanently disabling the service from booting.
- ✓
systemctl mask myapp.service
Why this is correct
Correct. `systemctl mask` creates a symlink to /dev/null, which makes the service impossible to start, even manually or via dependencies. This prevents the service from starting at boot.
- ✗
systemctl reset-failed myapp.service
Why it's wrong here
Incorrect. `systemctl reset-failed` resets the 'failed' state of a service, but it does not affect boot enablement.
- ✓
systemctl disable myapp.service
Why this is correct
Correct. `systemctl disable` removes the enable symlinks that cause the service to start on boot. However, without masking, the service could still be started manually or by dependencies. Therefore, disable alone is not enough; mask is also needed.
- ✗
systemctl daemon-reload
Why it's wrong here
Incorrect. `systemctl daemon-reload` reloads unit files but does not affect the enablement state of a service.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 507-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.