Which Docker command is used to list all running containers?

Prepare for the Docker Foundations Test. Review essential Docker concepts with multiple choice questions, each with hints and explanations. Ace your exam!

The command used to list all running containers in Docker is "docker ps." This command provides a detailed view of the containers that are currently active, including information such as container ID, image name, command being executed, creation time, status, ports, and names assigned to the containers.

When you run "docker ps," it displays only the containers that are running at that moment, which is useful for managing and monitoring the current state of your Docker environment. If you want to see all containers, both running and stopped, you can use "docker ps -a," but for just the running ones, "docker ps" is the correct and specific command.

The other options do not exist as valid Docker commands for listing containers. "docker list," "docker show," and "docker status" do not correspond to any functionality within Docker, making them incorrect choices for this particular question. Thus, "docker ps" is the proper command to fulfill the requirement of listing all running containers.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy