Skip to main content

Podman Cheatsheet

By Dejan Panovski Updated on Download PDF

Quick reference for Podman commands and rootless container workflows

Podman is a daemonless container engine for running OCI containers, images, pods, and rootless workloads. This cheatsheet covers the Podman commands you use most often for containers, images, volumes, networks, pods, systemd, Compose, and cleanup.

Container Lifecycle

Create, start, stop, and remove containers.

CommandDescription
podman run imageCreate and start a container
podman run -d imageRun container in background
podman run -it image shRun with an interactive shell
podman run --name web imageRun with a custom name
podman run -p 8080:80 imageMap host port to container port
podman run -v /host:/container imageBind mount a host path
podman start containerStart a stopped container
podman stop containerGracefully stop a container
podman restart containerRestart a container
podman rm containerRemove a stopped container
podman rm -f containerForce remove a running container
podman kill containerKill a container with SIGKILL
podman pause containerPause a running container
podman unpause containerResume a paused container

Container Inspection

List containers, inspect state, and watch resource use.

CommandDescription
podman psList running containers
podman ps -aList all containers
podman ps -qShow only container IDs
podman inspect containerShow detailed JSON info
podman inspect --format '{{.State.Status}}' containerPrint one field
podman top containerList processes in a container
podman statsShow live resource usage
podman stats --no-streamPrint one usage snapshot
podman port containerShow port mappings
podman diff containerShow filesystem changes

Logs

Read and follow container logs.

CommandDescription
podman logs containerView container logs
podman logs -f containerFollow live logs
podman logs --tail 50 containerShow the last 50 lines
podman logs -t containerAdd timestamps
podman logs --since 10m containerShow recent logs
podman logs --until 2026-06-03T12:00:00 containerStop at a time
journalctl --user -u name.serviceView logs for a user service
sudo journalctl -u name.serviceView logs for a system service

Images and Builds

Pull, build, tag, and manage images. Podman accepts Dockerfiles and Containerfiles.

CommandDescription
podman pull image:tagPull image from a registry
podman pull docker.io/library/nginxPull with a full image name
podman push image:tagPush image to a registry
podman build -t name .Build image from Dockerfile
podman build -f Containerfile .Build with a custom file
podman imagesList local images
podman rmi imageRemove an image
podman tag source target:tagTag an image
podman save image > image.tarSave image to tar archive
podman load < image.tarLoad image from tar archive
podman history imageShow image layer history

Exec and Copy

Run commands inside containers and copy files.

CommandDescription
podman exec -it container shOpen shell in container
podman exec -it container bashOpen Bash if installed
podman exec container commandRun command in container
podman exec -u root container commandRun as a specific user
podman cp ./file container:/path/Copy file into container
podman cp container:/path/file ./Copy file from container
podman attach containerAttach to main process
podman wait containerWait for container to stop

Volumes

Manage persistent container data.

CommandDescription
podman volume create dataCreate a named volume
podman volume lsList volumes
podman volume inspect dataShow volume details
podman volume rm dataRemove a volume
podman volume pruneRemove unused volumes
podman run -v data:/data imageMount named volume
podman run -v /host:/data imageBind mount host directory
podman run -v /host:/data:Z imageBind mount with SELinux relabeling
podman run --tmpfs /tmp imageMount tmpfs in a container

Networks

Create networks and connect containers.

CommandDescription
podman network create netCreate a network
podman network lsList networks
podman network inspect netShow network details
podman network rm netRemove a network
podman network connect net containerConnect container to network
podman network disconnect net containerDisconnect from network
podman run --network net imageRun container on network
podman run --network host imageUse host networking
podman run --network none imageDisable networking

Pods

Run groups of containers that share a network namespace.

CommandDescription
podman pod create --name appCreate a pod
podman pod create --name app -p 8080:80Create pod with port mapping
podman run --pod app imageRun container in pod
podman pod psList pods
podman ps --podShow containers with pod info
podman pod inspect appShow pod details
podman pod stop appStop all containers in pod
podman pod start appStart pod containers
podman pod rm appRemove a stopped pod
podman pod rm -f appForce remove a pod

Rootless and systemd

Inspect rootless mode and manage Podman with systemd.

CommandDescription
podman infoShow Podman host configuration
podman info --format '{{.Host.Security.Rootless}}'Check if rootless
podman system migrateApply user namespace changes
systemctl --user enable --now podman.socketStart user Podman socket
sudo systemctl enable --now podman.socketStart system Podman socket
sudo loginctl enable-linger $USERKeep user services after logout
systemctl --user daemon-reloadReload user units
systemctl --user status name.serviceCheck user service
sudo systemctl status name.serviceCheck system service
podman auto-updateUpdate containers with auto-update labels

Compose

Run Compose projects with Podman.

CommandDescription
podman compose upStart Compose project
podman compose up -dStart in background
podman compose downStop and remove services
podman compose psList Compose services
podman compose logsView Compose logs
podman compose exec service shShell into a service
podman-compose up -dUse podman-compose directly
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sockPoint Docker Compose at Podman
docker compose up -dRun Docker Compose against Podman socket

System and Cleanup

Check disk usage and remove unused data.

CommandDescription
podman system dfShow storage usage
podman system pruneRemove unused data
podman system prune --volumesAlso remove unused volumes
podman image pruneRemove dangling images
podman image prune -aRemove unused images
podman container pruneRemove stopped containers
podman volume pruneRemove unused volumes
podman network pruneRemove unused networks
podman system resetRemove all Podman storage

Registry and Login

Authenticate and work with container registries.

CommandDescription
podman login docker.ioLog in to Docker Hub
podman login registry.example.comLog in to private registry
podman logout docker.ioLog out from registry
podman search termSearch configured registries
podman pull user/image:tagPull image from registry
podman push user/image:tagPush image to registry
podman tag image registry/user/image:tagTag image for registry
podman manifest create nameCreate manifest list
podman manifest push name destinationPush manifest list

Docker Compatibility

Use Podman with Docker-style commands and tooling.

CommandDescription
sudo apt install podman-dockerInstall Docker-compatible wrapper
docker psRun Podman through Docker wrapper
alias docker=podmanAdd shell alias
podman --remote psUse remote Podman client
podman system service --time=0Start API service manually
podman info --format '{{.Host.RemoteSocket.Path}}'Show remote socket path
podman run -d -p 8080:80 nginxDocker-like run command