easyMultiple ChoiceObjective-mapped
XK0-006 PATH environment variable Practice Question
A user runs a command and receives the error 'bash: myapp: command not found'. The administrator confirms the binary exists in /usr/local/bin. Which environment variable should be checked?
⚠ Common exam trap
The trap is that candidates may think HOME is responsible for sourcing profile files, but the immediate cause of 'command not found' is usually a missing or incorrect PATH. The binary exists but the shell does not search in /usr/local/bin.
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
✓
PATH
The 'command not found' error indicates that the shell cannot locate the executable in any of the directories listed in the PATH environment variable. Even though the binary exists in /usr/local/bin, if that directory is not in PATH, the shell will not find it. Checking and correcting the PATH variable to include /usr/local/bin will resolve the issue.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
HOME
Why it's wrong here
Incorrect. HOME points to the user's home directory and is used for locating configuration files, but it does not directly affect the shell's ability to find executables. Adjusting HOME will not fix a missing PATH entry.
- ✗
SHELL
Why it's wrong here
Incorrect. SHELL indicates the login shell program (e.g., /bin/bash). It does not influence the search path for commands.
- ✗
LD_LIBRARY_PATH
Why it's wrong here
Incorrect. LD_LIBRARY_PATH is used to specify directories for shared libraries at runtime. It is not involved in locating executables.
- ✓
PATH
Why this is correct
Correct. The PATH variable controls which directories the shell searches when executing commands. Adding /usr/local/bin to PATH will resolve the 'command not found' error.
Visual reference
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
Bash
Bash is a command-line interpreter that lets users interact with an operating system by typing text commands instead of clicking icons.
Key term
Shell
A shell is a computer program that provides a user interface to access an operating system's services, typically by accepting text commands.
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.