EX188 Container Operations And Lifecycle Practice Question
An administrator wants to run a one-off command (/bin/sh) interactively inside an existing running container named legacy_app. Which command should be used?
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
✓
podman exec -it legacy_app /bin/sh
podman exec runs a new command inside a running container, and -it allows interactive terminal access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
podman run -it legacy_app /bin/sh
Why it's wrong here
podman run creates a new container from an image, rather than executing inside an already running one.
- ✗
podman enter legacy_app /bin/sh
Why it's wrong here
podman enter is not a standard Podman command (though older tools had nsenter wrappers, podman exec is correct).
- ✗
podman attach legacy_app --shell=/bin/sh
Why it's wrong here
podman attach does not take a shell argument; it attaches to the existing entrypoint process.
- ✓
podman exec -it legacy_app /bin/sh
Why this is correct
podman exec -it runs an interactive shell inside the target running container.
About these practice questions
Courseiva writes every EX188 question from scratch — 296 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Red Hat exam blueprint
This EX188 practice question is part of Courseiva's free Red Hat 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 EX188 exam.