Courseiva
mediumDrag & DropObjective-mapped

XK0-006 Practice Question: Drag and drop the steps to create and apply a…

Drag and drop the steps to create and apply a systemd service unit in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

1. Create the service unit file in /etc/systemd/system/. 2. Run systemctl daemon-reload. 3. Run systemctl enable myservice.service. 4. Run systemctl start myservice.service.

The correct sequence to create and apply a systemd service unit is: create the unit file in /etc/systemd/system/, then run systemctl daemon-reload to load the new unit, then run systemctl enable to set it to start on boot, and finally run systemctl start to start it immediately. Common mistakes include enabling before reloading, starting before enabling, or attempting to enable a non-existent unit.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • 1. Create the service unit file in /etc/systemd/system/. 2. Run systemctl daemon-reload. 3. Run systemctl enable myservice.service. 4. Run systemctl start myservice.service.

    Why this is correct

    This is correct because after creating a new unit file, you must reload systemd to make it aware of the new unit. Then enabling creates the necessary symlinks for boot startup, and starting initiates the service immediately.

  • 1. Create the service unit file. 2. Run systemctl enable myservice.service. 3. Run systemctl daemon-reload. 4. Run systemctl start myservice.service.

    Why it's wrong here

    This is incorrect because enabling a service before running daemon-reload will likely fail as systemd has not yet loaded the new unit file. The reload must precede enable.

  • 1. Create the service unit file. 2. Run systemctl daemon-reload. 3. Run systemctl start myservice.service. 4. Run systemctl enable myservice.service.

    Why it's wrong here

    This is incorrect because starting before enabling can work for immediate operation, but the correct order for proper boot behavior is to enable first then start. Enabling after starting may create symlinks but is out of sequence.

  • 1. Run systemctl enable myservice.service. 2. Create the service unit file. 3. Run systemctl daemon-reload. 4. Run systemctl start myservice.service.

    Why it's wrong here

    This is incorrect because you cannot enable a service that does not yet have a unit file. The unit file must be created first.

About these practice questions

This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.