LinuxCommandLibrary

distrobox-stop

Stop a running Distrobox container

TLDR

Stop a Distrobox container

$ distrobox-stop [container_name]
copy

Stop a Distrobox container non-interactively (without confirmation)
$ distrobox-stop [[-n|--name]] [container_name] [[-Y|--yes]]
copy

SYNOPSIS

distrobox-stop [NAME] [-h | --help] [-v | --verbose] [-r | --rootless] [-N | --dry-run] [-y | --yes]

PARAMETERS

-h, --help
    Display help message and exit.

-v, --verbose
    Enable verbose logging output.

-r, --rootless
    Force rootless container manager (Podman).

-N, --dry-run
    Simulate stop without executing commands.

-y, --yes
    Non-interactive; assume 'yes' to prompts.

NAME
    Container name to stop (all running if omitted).

DESCRIPTION

Distrobox-stop is a utility in the Distrobox suite for managing containerized Linux distributions. It halts specified or all running Distrobox containers by sending a SIGTERM to the container's init process (PID 1), allowing graceful shutdown. If unresponsive after 10 seconds, it escalates to SIGKILL.

Distrobox enables running distros like Ubuntu or Fedora inside containers on any Linux host, with host integration for apps, mounts, and display. This command ensures clean resource cleanup, preventing zombie processes or leftover mounts.

Supports Podman (default) or Docker, rootful/rootless modes. Ideal for multi-distro workflows on desktops like Fedora Silverblue or Steam Deck. Without a name, stops all; verbose mode aids debugging.

Integrates with systemd for auto-start services via distrobox-export, but stop respects container state.

CAVEATS

Containers must exist and run via distrobox-create; fails if not found. Rootless needs user namespaces. SIGTERM timeout is fixed at 10s.

EXAMPLES

distrobox-stop fedora
Stop specific 'fedora' container.

distrobox-stop -v
Stop all with verbose output.

distrobox-stop -r -y ubuntu
Rootless, non-interactive stop.

HISTORY

Introduced in Distrobox v1.2 (2021) by Luca Wehr (89luca89). Evolved with Podman v4+ support; now at v1.7+, focusing on immutable OS integration like Fedora CoreOS.

SEE ALSO

distrobox-create(1), distrobox-enter(1), distrobox-list(1), podman-stop(1), docker-stop(1)

Copied to clipboard