You are logged in to a Linux server running Docker Engine 24.x. To obtain a concise table showing only the containers that are currently running-excluding any that are stopped-using the original shorthand form of the Docker CLI, which single command should you run?
The legacy shorthand command docker ps lists only containers that are currently running. Adding the -a (or --all) option would include stopped containers, while the docker container ls command is a newer subcommand alias but is not the requested shorthand form. docker container ls -a lists all containers, and the pipeline using docker inspect gathers details for each listed ID rather than displaying the running containers directly.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Docker container?
Open an interactive chat with Bash
What does the `docker ps -a` command do?
Open an interactive chat with Bash
How is the `docker inspect` command different from `docker ps`?