List containers

View the status of containers on your system by using the podman ps command. You can list currently running containers or use the -a option to see all containers, including stopped ones.

Before you begin

  • The container-tools meta-package is installed.

Procedure

  1. Run the container-based the on registry.redhat.io/rhel10/support-tools image:
    $ podman run -dt registry.redhat.io/rhel10/support-tools
  2. List 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_brown
    • To 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    false

      You can restart containers that are not running if you did not remove them by using the --rm option.

      For more information, see the podman-images(1) man page on your system.