5.5. Listing containers
Use the podman ps command to list the running containers on the system.
Prerequisites
-
The
container-toolsmeta-package is installed.
Procedure
Run the container based on
registry.redhat.io/rhel10/support-toolsimage:$ podman run -d registry.redhat.io/rhel8/support-toolsList all containers:
To list all running containers:
$ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 74b1da000a11 rhel10/support-tools /usr/bin/bash 2 minutes ago Up About a minute musing_brownTo list all containers, running or stopped:
$ podman ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES IS INFRA d65aecc325a4 ubi10/ubi /bin/bash 3 secs ago Exited (0) 5 secs ago peaceful_hopper false 74b1da000a11 rhel10/support-tools /usr/bin/bash 2 mins ago Up About a minute musing_brown falseIf you do not remove containers that are not running, by using the
--rmoption, you can restart them.For more information, see the
podman-images(1)man page on your system.