Skip to content

Podman — Commands

Version and info

Check the installed Podman version:

podman -v

Get general information about the Podman installation:

podman info

Images

Pull an image:

podman pull <image name>

List images:

podman images ps

Running containers

Run a container from an image:

podman run <image name>

Give the container a custom name:

podman run --name <new name> <image>

Run detached (in the background):

podman run -d <image>

Publish a container's port to the host:

podman run -p <internal port>:<external port>/<TCP or UDP> <image>

Listing containers

List running containers:

podman container ps

List all containers, including stopped ones:

podman container ps -a

Logs

View a container's logs:

podman logs <image ID>

Checkpoint and restore

Freeze and save ("checkpoint") a running container's state to disk:

sudo podman container checkpoint <container_id>

Restore a container from a checkpoint — this only works for a container that was previously checkpointed:

sudo podman container restore <container_id>

See Migration for using checkpoint/restore to move a container between hosts.

Stopping and removing containers

Stop a container:

podman stop <container ID>

Remove a container:

podman rm <container ID>