CompTIA Linux+ Practice Questions: Containers

9 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering Containers. Each question shows the correct answer and a clear explanation. Ready for the real thing? Take the full timed quiz below.

🚀 Take the full CompTIA Linux+ quiz 📘 CompTIA Linux+ study guide

Q1. Which Docker command lists running containers?

Explanation: docker ps shows active containers (add -a for all). Learn more.

Q2. What does 'podman pull' do?

Explanation: pull fetches container images from registries. Learn more.

Q3. What does 'podman generate systemd' do?

Explanation: Creates systemd units to manage containers as services. Learn more.

Q4. What does 'podman build -t myimage .' do?

Explanation: Builds container image using current directory's Dockerfile. Learn more.

Q5. Which container command lists running Docker containers?

Explanation: docker ps lists currently running containers by default. Learn more.

Q6. Which container concept stores persistent data outside a container lifecycle?

Explanation: Container volumes persist data independently of a specific running container instance. Learn more.

Q7. Which Linux kernel feature enforces CPU and memory resource limits for groups of container processes?

Explanation: Control groups, or cgroups, account for and limit resources such as CPU time, memory, and I/O for process groups. Learn more.

Q8. What is the primary security benefit of running a container in rootless mode?

Explanation: Rootless containers run the engine and container processes without host root privileges, reducing the impact of a container escape or engine flaw. Learn more.

Q9. Which command displays the detailed runtime configuration and metadata of a Podman container?

Explanation: podman inspect returns structured details such as image, environment, mounts, network settings, and current state for a container. Learn more.

More CompTIA Linux+ practice topics