Docker Ps Command
# Docker ps Command
[Docker Command Encyclopaedia](#)
* * *
The docker ps command is used to list Docker containers.
By default, the docker ps command only shows running containers, but you can also specify options to display all containers, including stopped containers.
### Syntax
docker ps
OPTIONS Explanation:
* **`-a, --all`**: Show all containers, including stopped containers.
* **`-q, --quiet`**: Only display container IDs.
* **`-l, --latest`**: Show the most recently created container, including all states.
* **`-n`**: Show the n most recently created containers, including all states.
* **`--no-trunc`**: Do not truncate output.
* **`-s, --size`**: Display container sizes.
* **`--filter, -f`**: Filter displayed containers based on conditions.
* **`--format`**: Format the output.
### Examples
**1γList all running containers**
By default, docker ps only shows containers that are running.
docker ps CONTAINER ID IMAGE COMMAND ... PORTS NAMES 09b93464c2f7 nginx:latest "nginx -g 'daemon off" ... 80/tcp, 443/tcp mytutorial 96f7f14e99ab mysql:5.6 "docker-entrypoint.sh" ... 0.0.0.0:3306->3306/tcp mymysql
Output details:
**CONTAINER ID:** Container ID.
**IMAGE:** The image used.
**COMMAND:** The command run when starting the container.
**CREATED:** Container creation time.
**STATUS:** Container status.
There are 7 states:
* created
* restarting
* running
* removing
* paused
* exited
* dead
**PORTS:** Container port information and connection type (tcp/udp).
**N
YouTip