XK0-006 Security Practice Question
Which command displays the current SELinux mode?
⚠ Common exam trap
Many exam-takers confuse `sestatus` (which also shows the mode) with `getenforce`, but the exam expects the command specifically designed to output only the mode, and `setenforce` is often mistakenly chosen because it sounds like it 'gets' the enforce status.
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
✓
getenforce
The `getenforce` command displays the current SELinux mode as either Enforcing, Permissive, or Disabled. It reads the enforcing status directly from the kernel, making it the correct choice for checking the runtime mode.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
sestatus
Why it's wrong here
Shows more detailed status, but the question asks for mode specifically.
- ✗
setenforce
Why it's wrong here
Used to change mode, not display.
- ✗
selinuxenabled
Why it's wrong here
Returns exit status, not the mode.
- ✓
getenforce
Why this is correct
Displays the current SELinux mode.
Go deeper
Related to this question
About these practice questions
One of 979 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 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.