LFCS Service Configuration Practice Question
A Linux administrator needs to temporarily stop a service named 'httpd' without disabling it from starting automatically on subsequent boots. Which command should be used?
⚠ Common exam trap
A common mix-up: candidates confuse 'stop' with 'disable' or 'mask', thinking that stopping a service also prevents it from starting at boot, when in fact 'stop' only affects the current runtime state and has no effect on boot-time enablement.
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 stop httpd
The `systemctl stop httpd` command sends a SIGTERM signal to the main process of the httpd service, causing it to stop immediately. This action does not modify the service's enablement state, so the service will still start automatically on subsequent boots if it is enabled. This is the correct way to temporarily stop a service without altering its boot-time behavior.
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 httpd
Why this is correct
`systemctl stop httpd` halts the running unit immediately while leaving its enablement state untouched, so the symlinks in the multi-user.target.wants directory remain intact and the service still starts on subsequent boots. This satisfies the stem's requirement to stop temporarily without disabling autostart, unlike `systemctl disable`, which removes those symlinks.
- ✗
systemctl mask httpd
Why it's wrong here
systemctl mask links the unit to /dev/null, preventing it from being started at all, even manually, until unmasked. It is tempting as a way to stop a service, but it is designed for permanent prevention, whereas the scenario requires a temporary stop that leaves automatic startup intact.
- ✗
systemctl disable httpd
Why it's wrong here
systemctl disable removes the unit's symlinks from the boot target, so httpd will not start automatically on subsequent boots, directly contradicting the requirement. It is tempting because it stops future autostart, but the administrator needs the service to remain enabled and merely halted now.
- ✗
systemctl kill httpd
Why it's wrong here
systemctl kill sends a signal to processes of the unit without changing its enabled state or stopping it cleanly, so httpd may restart or remain active. It is tempting for forceful termination, but stopping while preserving boot enablement is what systemctl stop achieves.
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 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.