mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A system administrator wants to ensure that a…
A system administrator wants to ensure that a container can access host devices such as USB drives. Which Docker run option should be used?
⚠ Common exam trap
Many candidates choose `--privileged` because they think it is the only way to give a container hardware access, but the exam tests the understanding that `--device` provides granular, secure device access without the broad security implications of full privilege escalation.
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
✓
--device /dev/ttyUSB0
The `--device` flag in Docker allows a container to directly access a specific host device, such as `/dev/ttyUSB0` for a USB drive or serial adapter. This grants the container read/write permissions to the device node without requiring full privileged access, making it the precise and secure option for this requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
--device /dev/ttyUSB0
Why this is correct
This grants the container access to the specified host device.
- ✗
--privileged
Why it's wrong here
Gives all capabilities to the container, which is broader than needed and a security risk.
- ✗
--pid=host
Why it's wrong here
Shares the PID namespace with the host, not intended for device access.
- ✗
--net=host
Why it's wrong here
Shares the host's network stack, not related to device access.
Go deeper
Related to this question
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.