hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Refer to the exhibit
Exhibit
[Unit] Description=My Service After=network.target [Service] ExecStart=/usr/local/bin/myservice.sh Restart=always User=nobody [Install] WantedBy=multi-user.target
Refer to the exhibit. The service fails to start with the error 'Failed to start My Service: Unit not found'. What is the most likely cause?
⚠ Common exam trap
CompTIA often tests the distinction between 'unit not found' (file location issue) and 'command not found' or 'exec format error' (missing executable or script), leading candidates to incorrectly choose the missing ExecStart script option.
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
✓
The service file is not in the correct directory.
The error 'Unit not found' indicates that systemd cannot locate the service unit file. Systemd service files must be placed in specific directories such as /etc/systemd/system/ or /usr/lib/systemd/system/. If the file is in the wrong directory, systemd will not recognize the unit, causing the 'Unit not found' error. Option B correctly identifies this as the most likely cause.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The User specified does not exist.
Why it's wrong here
A missing user would cause a permission error, not unit not found.
- ✓
The service file is not in the correct directory.
Why this is correct
Unit files must be placed in /etc/systemd/system/ or /lib/systemd/system/ to be recognized.
- ✗
The network target is not reached.
Why it's wrong here
A network target failure would result in a dependency failure message, not unit not found.
- ✗
The ExecStart script is missing.
Why it's wrong here
If the script were missing, the error would indicate exec format error or file not found, not unit not found.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
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.
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
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 →
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.