Docker Cheat Sheet/List all containers

List running and stopped containers.

Section: Containers

List all containers

bash
bash
docker ps -a
Explanation

Useful for finding exited containers and previous runs.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Containers
List running containers
List running containers.
OpenIn sheetbashsame section
List containers
List running containers with the container namespace.
OpenIn sheetbashsame section
Run a container
Create and start a new container.
OpenIn sheetbashsame section
Run detached
Run a container in the background.
OpenIn sheetbashsame section
Run interactively
Run an interactive shell inside a new container.
OpenIn sheetbashsame section
Publish a port
Publish a container port to the host.
OpenIn sheetbashsame section