Common Podman commands

The following common Podman commands may be helpful as you create containers and specify images.

Command Description
podman images Lists all the available Podman images.
podman --ps all Lists all the available Podman containers.

podman start|stop|restart <container>

Start, stop, or restart containers.

podman rm <container>

Removes the container.

Before removing a container, the container should be stopped.

podman rmi <image>

Removes the Podman image.

Before removing the image, all the associated containers should be removed.

podman exec –it<container> bash

Get into a running container.

podman cp <container>:<path> <host-path>

podman cp <host-path> <container>:<path>

Copy files to and from a container.

podman logs<container>

Retrieves generated console messages from the container.

Note: See the Podman documentation for a detailed discussion of these and additional commands.