podman-ps(1)
π podman-ps(1) π
General Commands Manual β yes bestie, we're reading the manual manual today π
β¨ NAME β¨
podman-ps β print out information about containers π
π¦ SYNOPSIS π¦
podman ps [options]
podman container ps [options]
podman container list [options]
podman container ls [options]
Four whole ways to say the same thing, and honestly? iconic. pick your fave π«Ά
πΈ DESCRIPTION πΈ
okay so podman ps lists the containers that are running on your system, periodt. want the whole picture though? that's what the --all flag is for β it shows you everything, not just the live ones. no cap π
by default, here's what it spills for you:
- container id
- the name of the image the container is using
- the
COMMANDthe container is executing - the time the container was created
- the status of the container
- port mappings the container is using
- alternative names for the container
like, a full little vibe check on every container. obsessed π
β OPTIONS β
π --all, -a
show all the containers β default is only the running ones, so if you're like "where did my exited containers go??" this is your girl β¨
note bestie: Podman shares containers storage with other tools such as Buildah and CRI-O. in some cases these external containers might also exist in the same storage. use the--externaloption to see these external containers. external containers show the'storage'status. π«Ά
π§ --external
display external containers that are not controlled by Podman but are stored in containers storage π these external containers are generally created via other container technology such as Buildah or CRI-O, and they may depend on the same container images that Podman is also using. external containers are denoted with either a 'buildah' or 'storage' in the COMMAND and STATUS column of the ps output.
heads up: the restart-policy, volume, health, and annotation filters are not applicable for external containers. π
π₯ --filter, -f=_filter_
filter what containers ps shows you. multiple filters can be given with multiple uses of the --filter flag π filters with the same key work inclusive, with the only exception being label, which is exclusive. filters with different keys always work exclusive. iykyk π
here's every valid filter, no gatekeeping:
idβ[ID]Container's ID (CID prefix match by default; accepts regex)nameβ[Name]Container's name (accepts regex)annotationβ[Key]or[Key=Value]Annotation assigned to a containerannotation!β[Key]or[Key=Value]Annotation NOT assigned to a containerlabelβ[Key]or[Key=Value]Label assigned to a containerlabel!β[Key]or[Key=Value]Label NOT assigned to a containerexitedβ[Int]Container's exit codestatusβ[Status]Container's status:'created','initialized','running','stopped','paused','exited','removing','stopping','unknown'ancestorβ[ImageName]Image or descendant used to create container (accepts regex)beforeβ[ID]or[Name]Containers created before this containersinceβ[ID]or[Name]Containers created since this containervolumeβ[VolumeName]or[MountpointDestination]Volume mounted in containerhealthβ[Status]healthy or unhealthypodβ[Pod]name or full or partial ID of podnetworkβ[Network]name or full ID of networkrestart-policyβ[Policy]Container's restart policy (e.g.,'no','on-failure','always','unless-stopped')untilβ[DateTime]Containers created before the given duration or time.commandβ[Command]the command the container is executing, onlyargv[0]is takenshould-start-on-bootβ[Bool]Containers that need to be restarted after system reboot. True for containers with restart policy'always', or'unless-stopped'that were not explicitly stopped by the user
π --format=_format_
pretty-print containers to JSON or using a Go template β¨
valid placeholders for the Go template are listed below:
(β¦and that's where part 1 wraps, bestie β the placeholder list is coming right up π)
π the placeholder table (for when u wanna format ur own output)
okay so these are the placeholders u can drop into ur format string β each one pulls out a different lil fact about the container. left column = the placeholder, right column = what it gives u. periodt. π
.AutoRemoveβ If true, containers are removed on exit.CIDFileβ Container ID File.Commandβ Quoted command used.Created ...β Creation time for container,Y-M-D H:M:S.CreatedAtβ Creation time for container (same as above).CreatedHumanβ Creation time, relative.ExitCodeβ Container exit code.Exitedβ"true"if container has exited.ExitedAtβ Time (epoch seconds) that container exited.ExposedPorts ...β Map of exposed ports on this container.IDβ Container ID.Imageβ Image Name/ID.ImageIDβ Image ID.IsInfraβ"true"if infra container.Label stringβ Specified label of the container.Labelsβ All the labels assigned to the container.Mountsβ Volumes mounted in the container.Namesβ Name of container.Networksβ Show all networks connected to the container.Pidβ Process ID on host system.Podβ Pod the container is associated with (SHA).PodNameβ PodName of the container.Portsβ Forwarded and exposed ports.Restartsβ Display the container restart count.RunningForβ Time elapsed since container was started.Sizeβ Size of container.StartedAtβ Time (epoch seconds) the container started.Stateβ Human-friendly description of ctr state.Statusβ Status of container
β¨ OPTIONS (the rest of the menu, bestie) β¨
--help,-hβ Print usage statement. ur lil "what do i even type" rescue button π«Ά--last,-nβ Print the n last created containers, all states included. so if u pass-n 5ur getting the five most recent babies, no matter what state they're in π«--latest,-lβ Show the latest container created (all states). heads up tho: this option is not available with the remote Podman client β that includes Mac and Windows machines, WSL2 excluded π--namespace,--nsβ Display namespace information. get the whole namespace tea β--no-truncβ Do not truncate the output (defaultfalse). so nothing gets chopped off, u see the full unedited version, no cuts βοΈπ«--noheadingβ Omit the table headings from the listing of containers. just the rows, no header row, minimal queen behavior π--pod,-pβ Display the pods the containers are associated with. pods get a shoutout too π«--quiet,-qβ Print the numeric IDs of the containers only. no names, no noise, just IDs, and honestly? iconic π--size,-sβ Display the total file size. numbers on numbers π--sort=createdβ Sort bycommand,created,id,image,names,runningfor,size, orstatus.
β οΈ bestie read this one fr: choosing size sorts by size of rootFs, not alphabetically like the rest of the options. so that one's the odd one out, lowkey doing its own thing π
--syncβ Force a sync of container state with the OCI runtime. In some cases, a container's state in the runtime can become out of sync with Podman's state. This updates Podman's state based on what the OCI runtime reports. Forcibly syncing is much slower, but can resolve inconsistent state issues. π©Ή
like hitting refresh on a group chat that's glitching β takes a sec, but everything lines back up again.
--watch,-wβ Refresh the output with current containers on an interval in seconds. so it just keeps updating itself, live, the way that it stays current without u lifting a finger β¨ποΈ
β¨ EXAMPLES β¨
Okay bestie, this is the fun part β real commands, real output, all of it. Let's go πΈ
π List running containers
Just the ones that are, like, actually up right now:
$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4089df24d4f3 docker.io/library/centos:latest /bin/bash 2 minutes ago Up 2 minutes 0.0.0.0:80->8080/tcp, 0.0.0.0:2000-2006->2000-2006/tcp manyports
92f58933c28c docker.io/library/centos:latest /bin/bash 3 minutes ago Up 3 minutes 192.168.99.100:1000-1006->1000-1006/tcp zen_sanderson
π¦ List all containers
Every single one, running or not β no cap:
$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
π List all containers including their size
Heads up though β this one can take longer, because Podman has to actually go calculate the size from the file system. It's doing math for you, be nice π
$ podman ps -a -s
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
02f65160e14ca redis:alpine "redis-server" 20 hours ago Exited (-1) 20 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 27.49 MB
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 27.49 MB
π§ List all containers with a custom Go format
Running or not, and you pick exactly what shows up. Main character formatting energy β¨
$ podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}"
02f65160e14ca redis:alpine tier=backend proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
69ed779d8ef9f redis:alpine batch=no,type=small proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
π List all containers and display their namespaces
All the namespace tea, laid out in columns:
$ podman ps --ns -a
CONTAINER ID NAMES PID CGROUP IPC MNT NET PIDNS USER UTS
3557d882a82e3 k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1 29910 4026531835 4026532585 4026532593 4026532508 4026532595 4026531837 4026532594
09564cdae0bec k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 29851 4026531835 4026532585 4026532590 4026532508 4026532592 4026531837 4026532591
a31ebbee9cee7 k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 29717 4026531835 4026532585 4026532587 4026532508 4026532589 4026531837 4026532588
π List all containers including size, sorted by names
Same energy, but alphabetically ordered by name. Organized queen π
$ podman ps -a --size --sort names
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
π₯ List all external containers
These are the ones other tools made, not Podman. Outsiders, but we love them π«Ά
$ podman ps --external -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
38a8a78596f9 docker.io/library/busybox:latest buildah 2 hours ago storage busybox-working-container
fd7b786b5c32 docker.io/library/alpine:latest buildah 2 hours ago storage alpine-working-container
f78620804e00 scratch buildah 2 hours ago storage working-container
πΈ List containers with their associated pods
Who belongs to which pod β the group chat roster π¬
$ podman ps --pod
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME
4089df24d4f3 docker.io/library/nginx:latest nginx 2 minutes ago Up 2 minutes 80/tcp webserver 1234567890ab web-pod
92f58933c28c docker.io/library/redis:latest redis 3 minutes ago Up 3 minutes 6379/tcp cache 1234567890ab web-pod
a1b2c3d4e5f6 docker.io/library/centos:latest /bin/bash 1 minute ago Up 1 minute standalone-container
π List all containers with pod info, even the pod-less ones
Same thing but -a, so the ones with no pod at all show up too. They're valid, they're just solo π
$ podman ps -a --pod
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME
4089df24d4f3 docker.io/library/nginx:latest nginx 2 minutes ago Up 2 minutes 80/tcp webserver 1234567890ab web-pod
92f58933c28c docker.io/library/redis:latest redis 3 minutes ago Up 3 minutes 6379/tcp cache 1234567890ab web-pod
69ed779d8ef9f redis:alpine redis 25 hours ago Exited (0) 25 hours ago 6379/tcp old-cache 5678901234cd old-pod
a1b2c3d4e5f6 docker.io/library/centos:latest /bin/bash 1 minute ago Up 1 minute standalone-container
π Filter containers by pod name
$ podman ps --filter pod=web-pod
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4089df24d4f3 docker.io/library/nginx:latest nginx 2 minutes ago Up 2 minutes 80/tcp webserver
92f58933c28c docker.io/library/redis:latest redis 3 minutes ago Up 3 minutes 6379/tcp cache
β¨ Filter containers by Status
Only the running ones, please and thank you:
$ podman ps --filter status=running
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff660efda598 docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes 0.0.0.0:8080->80/tcp webserver
5693e934f4c6 docker.io/library/redis:latest redis-server 3 minutes ago Up 3 minutes 6379/tcp cache
2b271d67dbb6 3 minutes ago Up 3 minutes 0.0.0.0:9090->80/tcp 463241862e7e-infra
23f99674da1c docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes 0.0.0.0:9090->80/tcp pod-nginx
62180adfbd42 docker.io/library/redis:latest redis-server 3 minutes ago Up 3 minutes 0.0.0.0:9090->80/tcp, 6379/tcp pod-redis
5e3694604817 quay.io/centos/centos:latest sleep 300 3 minutes ago Up 3 minutes centos-test
af3d8b3f5471 docker.io/library/busybox:latest sleep 1000 3 minutes ago Up 3 minutes test-dev
b6ee47492b64 docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes (healthy) 80/tcp healthy-nginx
db75e6c397db docker.io/library/busybox:latest sleep 300 23 seconds ago Up 23 seconds test-volume-container
And the exited girlies, with -a in the mix:
$ podman ps -a --filter status=exited
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
94f211cc6e36 docker.io/library/alpine:latest sleep 1 4 minutes ago Exited (0) 4 minutes ago old-alpine
75a800cb848a docker.io/library/mysql:latest mysqld 3 minutes ago Exited (1) 3 minutes ago 3306/tcp, 33060/tcp db-container
2d9b3a94e31e docker.io/library/nginx:latest nginx 3 minutes ago Exited (0) 3 minutes ago 80/tcp nginx-cmd
π¦ Filter containers by name
$ podman ps --filter name=webserver
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff660efda598 docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes 0.0.0.0:8080->80/tcp webserver
π Filter containers by label
$ podman ps --filter label=app=frontend
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff660efda598 docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes 0.0.0.0:8080->80/tcp webserver
π§ Filter containers by annotation
Yes, annotations are a whole separate thing from labels. Yes, you will mix them up. It's fine π
$ podman ps --filter annotation=io.podman.annotations.autoremove=false
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5e3694604817 quay.io/centos/centos:latest sleep 300 3 minutes ago Up 3 minutes centos-test
π Filter containers by volume
$ podman ps --filter volume=mydata
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
db75e6c397db docker.io/library/busybox:latest sleep 300 42 seconds ago Up 42 seconds test-volume-container
π Filter containers by network
$ podman ps --filter network=web-net
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5e3694604817 quay.io/centos/centos:latest sleep 300 3 minutes ago Up 3 minutes centos-test
π₯ Filter containers that need a restart after a system reboot
The ones that are like "okay I got rebooted, put me back in coach" π«‘
$ podman ps -a --filter should-start-on-boot=true
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ff660efda598 docker.io/library/nginx:latest nginx -g daemon o... 3 minutes ago Up 3 minutes 0.0.0.0:8080->80/tcp webserver
5693e934f4c6 docker.io/library/redis:latest redis-server 3 minutes ago Exited (0) 3 minutes ago 6379/tcp cache
π Custom format for container and pod info
Look at how cute this reads β sentences, basically:
$ podman ps --format "{{.Names}} is in pod {{.PodName}} ({{.Pod}})"
webserver is in pod web-pod (1234567890ab)
cache is in pod web-pod (1234567890ab)
standalone-container is in pod ()
(Yeah that last one has empty parens β that container isn't in a pod, it's just living its truth π)
π SEE ALSO π
π HISTORY π
Originally written August 2017 by the icon herself, Urvashi Mohnani β umohnani@redhat.com β¨mailto:umohnani@redhat.comβ© π«Ά
And that's the whole podman-ps(1) man page, bestie β source and all, from the official Podman docs straight to your terminal. Go forth and ps responsibly, ily, bye π
β¨π
π¦ where this page comes from
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: podman 6.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms