2025-03-14 21:59:59 -06:00
|
|
|
# podman ps
|
|
|
|
|
|
|
|
|
|
> List Podman containers.
|
|
|
|
|
> More information: <https://docs.podman.io/en/latest/markdown/podman-ps.1.html>.
|
|
|
|
|
|
|
|
|
|
- List currently running Podman containers:
|
|
|
|
|
|
|
|
|
|
`podman ps`
|
|
|
|
|
|
|
|
|
|
- List all Podman containers (running and stopped):
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-a|--all]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show the latest created container (includes all states):
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-l|--latest]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Filter containers that contain a substring in their name:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-f|--filter]}} "name={{name}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Filter containers that share a given image as an ancestor:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-f|--filter]}} "ancestor={{image}}:{{tag}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Filter containers by exit status code:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-a|--all]}} {{[-f|--filter]}} "exited={{code}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Filter containers by status:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-f|--filter]}} "status={{created|running|removing|paused|exited|dead}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Filter containers that mount a specific volume or have a volume mounted in a specific path:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`podman ps {{[-f|--filter]}} "volume={{path/to/directory}}" --format "table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Mounts}}"`
|