XK0-006 Services and User Management Practice Question
A Linux administrator needs a service to be started automatically at boot and then started immediately without rebooting. The service unit file is located at /etc/systemd/system/myapp.service. Which command should the administrator run to accomplish both tasks?
⚠ Common exam trap
The trap here is assuming that starting a service also enables it for boot, or that daemon-reload is needed after enabling a unit.
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 myapp.service
The correct command is systemctl enable --now myapp.service. The enable subcommand sets up the unit to start at boot, and --now starts it immediately. This single command satisfies both requirements without requiring a reboot or separate commands. Other options either omit enabling, omit starting, or use commands that do not achieve both goals.
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 start myapp.service && systemctl daemon-reload
Why it's wrong here
Starting the service makes it run now, but daemon-reload only reloads systemd manager configuration; it does not enable the unit for boot. This sequence leaves the service disabled, so it will not start automatically after a reboot. The administrator must also enable the unit, which this command does not do.
- ✗
systemctl link /etc/systemd/system/myapp.service
Why it's wrong here
The link command links a unit file into the search path without enabling it. It does not create the dependencies needed for automatic startup at boot, nor does it start the service immediately. This command is used for linking unit files from outside the standard directories and is not appropriate for enabling a service.
- ✗
systemctl enable myapp.service && systemctl restart myapp.service
Why it's wrong here
Enabling creates the symlinks for boot, and restart would start the service if it were already running or start it if it is not. However, restart on a non-running unit starts it, so this would technically work, but it is not the intended single command and unnecessarily restarts a running service. The --now option is preferred for enabling and starting in one step.
- ✓
systemctl enable --now myapp.service
Why this is correct
This command both enables the unit to start at boot by creating the appropriate symlinks and starts it immediately. The --now flag is the standard systemd way to combine enable and start in one step. It satisfies the requirement to start automatically at boot and to start the service right away without rebooting.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
Key term
systemd
systemd is a system and service manager for Linux operating systems that initializes and manages processes, services, and system resources after the kernel boots.
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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
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.