XK0-006 Services and User Management Practice Question
A Linux administrator needs to ensure that a new service, `myapp.service`, starts automatically at boot and is also started immediately, without rebooting. The service unit file is already installed in `/etc/systemd/system/`. Which sequence of commands should the administrator run?
⚠ Common exam trap
The trap here is assuming that enabling a service also starts it immediately, or that starting a service also enables it for boot.
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 administrator must both enable the service for automatic startup at boot and start it immediately. The `systemctl enable --now` command accomplishes both tasks in one step, making it the correct choice. Other options either omit the immediate start, omit enabling, or use unnecessary commands like `daemon-reload` or `link` that do not address the requirements.
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 enable myapp.service
Why it's wrong here
This sequence starts the service and then enables it for boot, but it uses two separate commands. While functionally equivalent to the correct answer, it is less efficient and more prone to error. The exam expects knowledge of the combined `--now` flag for such scenarios, making this option suboptimal.
- ✗
systemctl link /etc/systemd/system/myapp.service && systemctl start myapp.service
Why it's wrong here
`systemctl link` is used to link a unit file from a non-standard location into the systemd search path, but the file is already in `/etc/systemd/system/`. This command does not enable the service for boot, and starting it only satisfies the immediate start requirement. The service would not start automatically on reboot.
- ✗
systemctl daemon-reload && systemctl enable myapp.service
Why it's wrong here
This reloads the systemd manager configuration and enables the service, but it does not start the service immediately. The `daemon-reload` is only needed if the unit file was newly created or modified, and it does not start the service. The requirement to start immediately is not met.
- ✓
systemctl enable --now myapp.service
Why this is correct
This command both enables the unit to start at boot and starts it immediately. The `--now` flag combines `enable` and `start`, which is exactly what the administrator needs without rebooting. It is the most efficient and correct way to satisfy both requirements in a single command.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
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
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
One of 781 original XK0-006 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 →
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.