Podman
What is Podman?
Podman (Pod Manager) is a container engine that allows you to build, run, and manage containers and pods. It's a drop-in replacement for Docker that doesn't require a daemon and runs rootless by default, making it more secure and lightweight. Podman is part of the OCI (Open Container Initiative) ecosystem and is compatible with Docker images and commands.
Key Benefits:
- No daemon required (runs directly)
- Rootless containers by default (better security)
- Pod support (group multiple containers)
- Docker-compatible CLI
- Lightweight resource footprint
Linux Setup
Prerequisites
- Linux kernel 5.11 or later
- sudo or root access
Step-by-Step Installation
1. Update your package manager
sudo apt update && sudo apt upgrade -y
# or for RHEL/CentOS:
# sudo dnf update -y2. Install Podman
sudo apt install -y podman
# or for RHEL/CentOS:
# sudo dnf install -y podman3. Verify installation
podman --version4. Test Podman
podman run hello-world5. (Optional) Enable rootless mode
podman system migrateThat's it! You're ready to use Podman on Linux.
Windows Setup
Prerequisites
- Windows 10/11 (Pro, Enterprise, or Home Edition)
- Administrator access
- At least 4GB RAM available
- Virtualization enabled in BIOS
Step 1: Install WSL 2 (Windows Subsystem for Linux)
WSL 2 provides a lightweight Linux environment on Windows where Podman can run efficiently.
1. Open PowerShell as Administrator
2. Install WSL 2 with Ubuntu
wsl --install -d Ubuntu3. Wait for installation to complete, then restart your computer
4. After restart, set up your WSL username and password
- Open PowerShell or Windows Terminal
- Run:
wsl - Create a username and password for your Linux environment
5. Verify WSL installation
wsl --list --verboseStep 2: Install Podman in WSL 2
1. Open WSL terminal
wsl2. Update Ubuntu packages
sudo apt update && sudo apt upgrade -y3. Install Podman
sudo apt install -y podman4. Verify installation
podman --version5. Test Podman
podman run hello-worldStep 3: Access Podman from Windows (Optional)
To use Podman commands directly from Windows PowerShell:
1. Add WSL to your PATH
- Open PowerShell as Administrator
- Create an alias:
New-Item -Path $PROFILE -Type File -Force
notepad $PROFILE2. Add these lines to your PowerShell profile:
function podman {
wsl podman $args
}3. Save and reload PowerShell
& $PROFILE4. Now you can use Podman directly from Windows:
podman run hello-worldQuick Reference Commands
# List containers
podman ps -a
# Run a container
podman run -d --name myapp image:tag
# View logs
podman logs container_name
# Stop container
podman stop container_name
# Remove container
podman rm container_name
# Build image
podman build -t myimage:tag .
# List images
podman imagesTroubleshooting
WSL not found?
- Ensure you're on Windows 10 v19041 or later
- Enable virtualization in BIOS settings
Permission denied errors?
- Use
sudoor configure rootless mode:
podman system migrateSlow performance?
- Increase WSL memory in
.wslconfig - Close unnecessary applications