CompTIA Linux+ (XK0-005) — Question 11

A Linux administrator needs to analyze a failing application that is running inside a container. Which of the following commands allows the Linux administrator to enter the running container and analyze the logs that are stored inside?

Answer options

Correct answer: B

Explanation

The correct answer is B, as 'podman exec' allows the administrator to enter a running container interactively. Option A runs a new container instead of accessing an existing one, while C also starts a new container in detached mode, and D executes a command in a running container but does not provide an interactive shell.