DISTROBOX-CREATE(1)
๐ DISTROBOX-CREATE โ the distrobox-create glow-up guide โจ
okay bestie, welcome to the DISTROBOX-CREATE(1) manual page, aka User Manual territory, and honestly? this one is a whole serve. it's the distrobox create / distrobox-create command, and it is literally the moment your container is born. let's get into it ๐
โจ NAME โจ
distrobox create distrobox-create
bestie it's giving "two names, one icon". same command, two ways to call it. ๐
๐ธ DESCRIPTION ๐ธ
so distrobox-create is the one that takes care of creating the container โ you feed it an input name and an image, and it does the thing. no cap.
and the container it makes? oh she's โจintegratedโจ. we're talking:
- sharing of the HOME directory of the user ๐
- external storage ๐พ
- external usb devices ๐
- graphical apps โ that's X11/Wayland, both of them, we don't pick favorites ๐ผ๏ธ
- and audio ๐
it's the tightest host-and-guest friendship you've ever seen, fr fr. ๐ซถ
๐ฆ SYNOPSIS ๐ฆ
distrobox create
and now, the flags, the whole squad, in order, no skips, no shortcuts:
--image/-iโ the image to use for the container. default:${container_image_default}๐ผ๏ธ--name/-nโ the name for the distrobox. default:${container_name_default}๐--hostnameโ the hostname for the distrobox. default:<container-name>.$(uname -n)๐ท๏ธ--pull/-pโ pull the image even if it exists locally (this implies--yes, so bestie, heads up, it's gonna stop asking) ๐ฅ--yes/-Yโ non-interactive mode, pulls images without asking ๐ซก--root/-rโ launchpodman/docker/lilipodwith root privileges. note that if you need root, this is the preferred way over"sudo distrobox"(and also note: if using a program other than'sudo'for root privileges is necessary, specify it through theDBX_SUDO_PROGRAMenv variable, or'distrobox_sudo_program'config variable) ๐--clone/-cโ name of the distrobox container to use as base for a new container. this is useful to either rename an existing distrobox or have multiple copies of the same environment ๐งฌ--home/-Hโ select a custom HOME directory for the container. useful to avoid host's home littering with temp files ๐ก--volumeโ additional volumes to add to the container ๐ฆ--additional-flags/-aโ additional flags to pass to the container manager command ๐ฉ--additional-packages/-apโ additional packages to install during initial container setup ๐--init-hooksโ additional commands to execute at the end of container initialization ๐ช--pre-init-hooksโ additional commands to execute at the start of container initialization ๐ช--init/-Iโ use an init system (like systemd) inside the container. this will make host's processes not visible from within the container (it assumes--unshare-process). it may require additional packages depending on the container image:https://github.com/89luca89/distrobox/blob/main/docs/useful_tips.md#using-init-system-inside-a-distroboxโ๏ธ--nvidiaโ try to integrate host's nVidia drivers in the guest ๐ฎ--platformโ specify which platform to use, eg:linux/arm64๐งฉ--unshare-devsysโ do not share host devices and sysfs dirs from host ๐ซ--unshare-groupsโ do not forward user's additional groups into the container ๐ซ--unshare-ipcโ do not share ipc namespace with host ๐ซ--unshare-netnsโ do not share the net namespace with host ๐ซ--unshare-processโ do not share process namespace with host ๐ซ--unshare-allโ activate all the unshare flags below ๐ซโจ--compatibility/-Cโ show list of compatible images ๐--help/-hโ show this message ๐--no-entryโ do not generate a container entry in the application list ๐--dry-run/-dโ only print the container manager command generated ๐งช--verbose/-vโ show more verbosity ๐ฃ๏ธ--version/-Vโ show version ๐ข--absolutely-disable-root-password-i-am-really-positively-sureโ โ ๏ธ โ ๏ธ when setting up a rootful distrobox, this will skip user password setup, leaving it blank. โ ๏ธ โ ๏ธ ๐
bestie that last one has the longest flag name in the game for a REASON. it is loud on purpose. read it twice. leaving a password blank is not a vibe, it's a liability. ๐ญ
๐ COMPATIBILITY ๐
for a list of compatible images and container managers, please consult the man page:
man distrobox
man distrobox-compatibility
or consult the documentation page on: https://github.com/89luca89/distrobox/blob/main/docs/compatibility.md#containers-distros ๐
๐ EXAMPLES ๐
โจ Create a distrobox with image alpine, called my-alpine container
distrobox create --image alpine my-alpine-container
โจ Create a distrobox from fedora-toolbox:35 image
distrobox create --image registry.fedoraproject.org/fedora-toolbox:35 --name fedora-toolbox-35
โจ Clone an existing distrobox container
distrobox create --clone fedora-35 --name fedora-35-copy
โจ Always pull for the new image when creating a distrobox
distrobox create --pull --image centos:stream9 --home ~/distrobox/centos9
โจ Add additional environment variables to the container
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR=value"
โจ Add additional volumes to the container
distrobox create --image fedora:35 --name test --volume /opt/my-dir:/usr/local/my-dir:rw --additional-flags "--pids-limit -1"
โจ Add additional packages to the container
distrobox create --image alpine:latest --name test2 --additional-packages "git tmux vim"
โจ Use init-hooks to perform an action during container startup
distrobox create --image alpine:latest --name test --init-hooks "touch /var/tmp/test1 && touch /var/tmp/test2"
โจ Use pre-init-hooks to perform an action at the beginning of the container startup (before any package manager starts)
distrobox create -i docker.io/almalinux/8-init --init --name test --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-release"
โจ Use init to create a Systemd container (acts similar to an LXC):
distrobox create -i ubuntu:latest --name test --additional-packages "systemd libpam-systemd pipewire-audio-client-libraries" --init
โจ Use init to create a OpenRC container (acts similar to an LXC):
distrobox create -i alpine:latest --name test --additional-packages "openrc" --init
โจ Use host's NVidia drivers integration
distrobox create --image ubuntu:22.04 --name ubuntu-nvidia --nvidia
โจ Do not use host's IP inside the container:
distrobox create --image ubuntu:latest --name test --unshare-netns
โจ Create a more isolated container, where only the $HOME, basic sockets and host's FS (in /run/host) is shared:
distrobox create --name unshared-test --unshare-all
โจ Create a more isolated container, with it's own init system, this will act very similar to a full LXC container:
distrobox create --name unshared-init-test --unshare-all --init --image fedora:latest
โจ Use environment variables to specify container name, image and container manager:
DBX_CONTAINER_MANAGER="docker" DBX_NON_INTERACTIVE=1 DBX_CONTAINER_NAME=test-alpine DBX_CONTAINER_IMAGE=alpine distrobox-create
๐ง ENVIRONMENT VARIABLES ๐ง
the whole env var lineup, every single one, present and accounted for:
DBX_CONTAINER_ALWAYS_PULLDBX_CONTAINER_CUSTOM_HOMEDBX_CONTAINER_HOME_PREFIXDBX_CONTAINER_IMAGEDBX_CONTAINER_MANAGERDBX_CONTAINER_NAMEDBX_CONTAINER_HOSTNAMEDBX_NON_INTERACTIVEDBX_SUDO_PROGRAM
DBX_CONTAINER_HOME_PREFIX defines where containers' home directories will be located. If you define it as ~/dbx then all future containers' home directories will be ~/dbx/$container_name ๐ โจ
โจ EXTRA โจ
okay bestie, this is the part where we get fancy ๐ these are the little extras that make your container go from "fine" to "obsessed".
๐ tweaking the defaults
The --additional-flags (or -a, same thing, pick your fave) is your little remote control for the container creation defaults. like, watch this:
distrobox create -i docker.io/library/archlinux -n dev-arch
podman container inspect dev-arch | jq '.[0].HostConfig.PidsLimit'
2048
distrobox rm -f dev-arch
distrobox create -i docker.io/library/archlinux -n dev-arch --volume $CBL_TC:/tc --additional-flags "--pids-limit -1"
podman container inspect dev-arch | jq '.[0].HostConfig,.PidsLimit'
0
see how the PidsLimit went from 2048 to 0?? that's the flag doing its thing, no cap ๐ฅ
๐ธ adding volumes
More volumes? say less. Use the --volume flag โ it follows the exact same standard as docker and podman for specifying the mount point, so it's --volume SOURCE_PATH:DEST_PATH:MODE. iconic.
distrobox create --image docker.io/library/archlinux --name dev-arch --volume /usr/share/:/var/test:ro
๐ฆ env vars that STICK
During container creation you can specify (using the additional-flags, remember her) some environment variables that will persist in the container and stay completely independent from your environment. main character energy fr fr:
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR=value"
๐ --init-hooks my beloved
The --init-hooks is useful to add commands to the entrypoint (init) of the container. super handy for making containers with a whole set of programs already installed, or adding users, groups โ all that setup stuff you'd otherwise do by hand ๐
distrobox create --image fedora:35 --name test --init-hooks "dnf groupinstall -y \"C Development Tools and Libraries\""
๐ --init = system container szn
The --init is useful to create a container that will use its own separate init system within. for example using:
distrobox create -i docker.io/almalinux/8-init --init --name test
distrobox create -i docker.io/library/debian --additional-packages "systemd" --init --name test-debian
Inside the container we will be able to use normal systemd units, bestie:
~$ distrobox enter test
user@test:~$ sudo systemctl enable --now sshd
user@test:~$ sudo systemctl status sshd
โ sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-01-28 22:54:50 CET; 17s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 291 (sshd)
โ ๏ธ heads up bestie: enabling--initwill disable host's process integration. From within the container you will not be able to see and manage host's processes. This is needed because/sbin/initmust be pid 1. like, it's a whole thing, but it's required, no negotiating ๐
If you want to use a non-pre-create image, you'll need to add the additional package:
distrobox create -i alpine:latest --init --additional-packages "openrc" -n test
distrobox create -i debian:stable --init --additional-packages "systemd libpam-systemd pipewire-audio-client-libraries" -n test
distrobox create -i ubuntu:22.04 --init --additional-packages "systemd libpam-systemd pipewire-audio-client-libraries" -n test
distrobox create -i archlinux:latest --init --additional-packages "systemd" -n test
distrobox create -i registry.opensuse.org/opensuse/tumbleweed:latest --init --additional-packages "systemd" -n test
distrobox create -i registry.fedoraproject.org/fedora:39 --init --additional-packages "systemd" -n test
The --init flag is useful to create system containers, where the container acts more similar to a full VM than an application-container. Inside you'll have a separate init, user-session, daemons and so on. it's giving whole little computer ๐
๐ --home
The --home flag let's you specify a custom HOME for the container. Note that this will NOT prevent the mount of the host's home directory, but will ensure that configs and dotfiles will not litter it. polite of it honestly ๐ซถ
๐
--root
The --root flag will let you create a container with real root privileges. At first enter the user will be required to setup a password. This is done in order to not enable passwordless sudo/su, in a rootful container โ this is needed because in this mode, root inside the container is also root outside the container! ๐ญ like that's not a vibe, that's a whole security situation.
๐ --absolutely-disable-root-password-i-am-really-positively-sure
This one will skip user password setup, leaving it blank.
๐จ This is genuinely dangerous and you really, positively should NOT enable this. I'm not playing, bestie. don't. ๐
โญ apps list moment
From version 1.4.0 of distrobox, when you create a new container, it will also generate an entry in the applications list. free app icon, we love to see it ๐
๐ฆ NVidia integration ๐ฆ
If your host has an NVidia gpu, with installed proprietary drivers, you can integrate them with the guests by using the --nvidia flag:
distrobox create --nvidia --image ubuntu:latest --name ubuntu-nvidia
Be aware that this is not compatible with non-glibc systems and needs somewhat newer distributions to work.
This feature was tested working on:
- Almalinux
- Archlinux
- Centos 7 and newer
- Clearlinux
- Debian 10 and newer
- OpenSUSE Leap
- OpenSUSE Tumbleweed
- Rockylinux
- Ubuntu 18.04 and newer
- Void Linux (glibc)
and that's the whole page, bestie!! go make some containers, slay, hydrate, and remember: read the flags before you send them ๐โจ
that was Distrobox, DISTROBOX-CREATE(1), dated Mar 2026 โ love you, bye ๐๐ฆ๐
๐ฆ where this page comes from
- alpine 3.24: distrobox-doc 1.8.2.5-r0 ยท GPL-3.0-only
- arch rolling: distrobox 1.8.2.5-1 ยท GPL-3.0-only
- epel 10: distrobox 1.8.2.5-1.el10_3 ยท GPL-3.0-only
- epel 9: distrobox 1.8.2.5-1.el9 ยท GPL-3.0-only
- fedora 43: distrobox 1.8.2.5-1.fc43 ยท GPL-3.0-only
- fedora 44: distrobox 1.8.2.5-1.fc44 ยท GPL-3.0-only
- nixos 26.05: distrobox 1.8.2.5
- nixpkgs unstable: distrobox 1.8.2.5
- ubuntu stonking: distrobox 1.8.2.5-1 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms