Toolbx Cheatsheet

Toolbx Cheatsheet for Non-Cheaters

A container management tool for Linux development environments using Podman/Docker. Official Docs

Installation

# Fedora
sudo dnf install toolbox podman

# Ubuntu (20.04+)
sudo apt install toolbox podman

# Arch Linux
sudo pacman -S toolbox podman

Basic Commands

Command Description
toolbox create --distro <name> <container> Create new container
toolbox enter <container> Enter container shell
toolbox list List containers
toolbox rm <container> Delete container
toolbox run <container> <command> Run command in container
toolbox stop <container> Stop container

Podman/Docker Integration

Custom Images

# From Docker Hub
toolbox create --image docker://alpine alpine-docker

# From Podman local image
toolbox create --image podman://localhost/my-image my-podman-container

# Build and use custom image
podman build -t my-toolbox-image .
toolbox create --image my-toolbox-image custom-container

Manage Containers

# List Podman containers (including Toolbx)
podman ps -a

# Inspect Toolbx container
podman inspect <container-name>

# Access Podman from within Toolbx
toolbox enter my-container
podman --version

Key Features

  1. Shared Home: Host's $HOME mounted at /home/$USER

Storage Management:

# Show Podman storage
podman system df

# Cleanup unused images
podman image prune

Image Sources:

# Official images
toolbox create --distro ubuntu --release 22.04

# Custom registries
toolbox create --image quay.io/centos/centos:stream9

Workflow Examples

Create Dev Environment

toolbox create --distro fedora --release 38 dev
toolbox enter dev
sudo dnf install @development-tools

Run GUI App

# Host machine first:
xhost +local:
# Then in Toolbx container:
toolbox run --container dev firefox

Temporary Workspace

toolbox create --ephemeral --image docker://alpine temp-env
toolbox enter temp-env
# Example: Install git temporarily
apk add git
# Container destroyed after exit

Troubleshooting

Permission Issues

# Ensure subuid/subgid configured (run on host)
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER

Reset Toolbx

# WARNING: Deletes all Podman containers/images/volumes!
podman system reset
# Optional: Remove Toolbx specific data
rm -rf ~/.local/share/containers/toolbox

Check Backend

# Verify Podman is default
toolbox --log-level debug create test-container | grep 'Using backend'

Appendix: Podman vs Docker

Feature Podman Docker
Daemon Daemonless Requires dockerd
Root permissions Rootless mode supported Typically needs root
Toolbx integration Default backend Works via socket
Compose files podman-compose docker-compose
Note: Toolbx uses Podman by default. For Docker compatibility:Install docker-compose in containers when neededUse --device flags for hardware accessShare Docker socket: toolbox create --volume /var/run/docker.sock:/var/run/docker.sock