Skip to content

Linux Podman Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux Podman Guide

Complete beginner-friendly guide to Podman on Linux, covering Arch Linux, CachyOS, and other distributions including installation, container management, and rootless containers.


Table of Contents

  1. Podman Installation
  2. Podman Basics
  3. Rootless Containers
  4. Container Management
  5. Troubleshooting

Podman Installation

Install Podman

Arch/CachyOS:

# Install Podman
sudo pacman -S podman podman-compose

# Install rootless support
sudo pacman -S slirp4netns

Debian/Ubuntu:

sudo apt install podman

Fedora:

sudo dnf install podman

Verify Installation

Check Podman:

# Check version
podman --version

# Test Podman
podman run hello-world

Podman Basics

Run Container

Basic usage:

# Run container
podman run nginx

# Run in background
podman run -d nginx

# Run with name
podman run --name my-nginx nginx

Container Management

Manage containers:

# List containers
podman ps
podman ps -a

# Stop container
podman stop container-name

# Start container
podman start container-name

# Remove container
podman rm container-name

Rootless Containers

Rootless Mode

Podman advantage:

# Run without sudo
podman run nginx

# No root required
# More secure

Configure Rootless

Setup rootless:

# Enable user namespaces
echo "kernel.unprivileged_userns_clone=1" | sudo tee -a /etc/sysctl.conf

# Reboot or apply
sudo sysctl -p

Container Management

Execute Commands

Run commands:

# Execute command
podman exec -it container-name /bin/bash

# Run command
podman exec container-name command

View Logs

Container logs:

# View logs
podman logs container-name

# Follow logs
podman logs -f container-name

Troubleshooting

Podman Not Working

Check configuration:

# Check Podman
podman info

# Check user namespace
cat /proc/sys/kernel/unprivileged_userns_clone

Network Issues

Fix networking:

# Install network support
sudo pacman -S slirp4netns

# Check network
podman network ls

Summary

This guide covered Podman installation, rootless containers, and container management for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally