Courseiva
Service ConfigurationmediumMultiple ChoiceObjective-mapped

LFCS Service Configuration Practice Question

A service that was once enabled is now failing to start. The administrator wants to immediately disable it to prevent boot delays. Which command sequence is correct?

⚠ Common exam trap

Test-takers frequently choose Option B because they think stopping the service first is safer, but they overlook that the `&&` operator will skip the disable if the stop fails, leaving the service enabled and potentially causing boot delays, whereas `systemctl disable --now` handles both actions reliably regardless of the stop command's exit status.

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 disable --now service

`systemctl disable --now service` both stops the service immediately and disables it from starting at boot in a single atomic command. This is the most efficient way to prevent boot delays caused by a failing service, as it combines the stop and disable actions without relying on shell operators that could fail if the first command exits with a non-zero status.

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 disable service ; systemctl stop service

    Why it's wrong here

    Disable then stop, but if disable fails, stop may not run.

  • systemctl stop service && systemctl disable service

    Why it's wrong here

    Correct but not the most efficient.

  • systemctl disable --now service

    Why this is correct

    Stops and disables immediately.

  • systemctl mask service

    Why it's wrong here

    Masking prevents any start, but does not stop if already running.

About these practice questions

One of 507 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.