Courseiva
mediumMultiple Choice

XK0-006 Practice Question: A service named 'myapp' is currently running but…

A service named 'myapp' is currently running but should be disabled so it does not start automatically at boot. Which command accomplishes this?

⚠ Common exam trap

Candidates often confuse 'disable' with 'stop' or 'mask', mistakenly thinking that stopping a service also prevents it from starting at boot, or that masking is the same as disabling when it actually prevents all manual and automatic starts.

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 myapp

The correct command is `systemctl disable myapp` because it removes the symlinks that cause the service to start automatically at boot, while leaving the currently running service unaffected. This directly meets the requirement of disabling automatic startup without stopping the running process.

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 myapp

    Why this is correct

    systemctl disable removes the unit's symbolic links from the boot target's wants directory, preventing automatic start at boot while leaving the currently running process untouched. Stopping it now would require systemctl stop, which the stem does not ask for.

  • ✗

    systemctl kill myapp

    Why it's wrong here

    kill sends a signal to the running process, terminating it immediately without altering the unit's boot-time enablement, so it restarts at next boot. It is tempting when a hung or unresponsive service must be forcibly terminated, but that addresses runtime state, not startup configuration.

  • ✗

    systemctl mask myapp

    Why it's wrong here

    Masking links the unit to /dev/null, preventing both automatic and manual starts, which exceeds the requirement to merely stop automatic startup while leaving the service startable. It is tempting for permanently decommissioning a service that must never run again, even manually.

  • ✗

    systemctl stop myapp

    Why it's wrong here

    stop halts the running service now but leaves it enabled, so it still starts automatically at the next boot, failing the disable requirement. It is tempting because stopping is the immediate visible action, and it is correct when you only need to halt a service until the next reboot.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 781 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.