Courseiva
easyMultiple Choice

XK0-006 Practice Question: A system administrator needs to ensure that the…

A system administrator needs to ensure that the Apache HTTP server starts automatically at boot and is started immediately without rebooting. Which command accomplishes both tasks?

⚠ Common exam trap

Candidates often think `systemctl enable` alone starts the service, or they confuse `--now` with a reboot requirement, leading them to pick option B or C instead of the combined D.

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 enable --now httpd

The `systemctl enable --now httpd` command combines two actions: it creates the necessary symlinks to start the Apache HTTP server automatically at boot (enable) and immediately starts the service without rebooting (start). The `--now` flag is the key to performing both tasks in a single command, fulfilling the requirement exactly.

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 --now httpd

    Why it's wrong here

    disable --now stops the unit and removes its boot symlink, the opposite of the requirement. It is tempting because --now performs an immediate action, but that action is stopping. enable --now is the correct pairing for persistent plus immediate start.

  • ✗

    systemctl enable httpd

    Why it's wrong here

    enable httpd creates the boot-time symlink but does not start the service now, so the immediate requirement is unmet. It is tempting because enable is the persistence verb. Adding --now, or running start separately, satisfies both conditions.

  • ✗

    systemctl start httpd

    Why it's wrong here

    start httpd launches the service immediately but creates no boot-time symlink, so it will not restart after reboot. It is tempting because it satisfies the instant requirement. enable --now covers both persistence and immediate activation in one command.

  • ✓

    systemctl enable --now httpd

    Why this is correct

    `systemctl enable --now httpd` satisfies both constraints in one invocation: `enable` creates the systemd symlink so the unit starts at boot, while `--now` immediately activates it via `start`, avoiding a reboot. This combines persistence and immediate runtime state, unlike `enable` alone or `start` alone.

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.