{"id":4079,"date":"2024-04-10T22:34:42","date_gmt":"2024-04-11T02:34:42","guid":{"rendered":"https:\/\/dft.wiki\/?p=4079"},"modified":"2026-06-08T10:45:02","modified_gmt":"2026-06-08T14:45:02","slug":"running-distribution-containers-with-distrobox","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=4079","title":{"rendered":"Running Distribution like Containers with DistroBox"},"content":{"rendered":"<p><strong>DistroBox<\/strong> is an automation tool for deploying distribution-like containers in a terminal [<a href=\"https:\/\/github.com\/89luca89\/distrobox\">Link<\/a>]. It can run anything from GUI apps to full graphical environments.<\/p>\n<p>Although Docker is the most popular container platform, Podman is recommended for better security. Unlike Docker, Podman runs containers with user-level permissions instead of root.<\/p>\n<p>Containers are well integrated with the host OS, sharing the user&#8217;s home directory, external storage, and even USB or audio\/graphical peripherals.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/user-images.githubusercontent.com\/598882\/144294862-f6684334-ccf4-4e5e-85f8-1d66210a0fff.png\" \/><\/p>\n<ul>\n<li>Use cases for DistroBox:\n<ul>\n<li><strong>Development<\/strong>: test applications across multiple distributions.<\/li>\n<li><strong>Distro-hopping<\/strong>: test different Linux flavours safely and effortlessly.<\/li>\n<li><strong>Privilege workaround<\/strong>: gain full control inside a container when the host restricts permissions.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<p><strong>INSTALLATION ON UBUNTU<\/strong><\/p>\n<p>Requirements<\/p>\n<pre>sudo apt update\r\nsudo apt install docker.io podman -y<\/pre>\n<p>Add the repository and install DistroBox.<\/p>\n<pre>sudo add-apt-repository ppa:michel-slm\/distrobox\r\nsudo apt update\r\nsudo apt install distrobox -y<\/pre>\n<hr \/>\n<p><strong>BASIC USAGE<\/strong><\/p>\n<p>List available commands and existing boxes.<\/p>\n<pre>distrobox help\r\ndistrobox ls<\/pre>\n<p>Create and enter a box.<\/p>\n<pre>distrobox create -n UbuntuBox --image ubuntu:24.04\r\ndistrobox enter UbuntuBox<\/pre>\n<p>Install and export an app from inside a box.<\/p>\n<pre>$ sudo apt install kolourpaint -y\r\n$ kolourpaint\r\n$ distrobox-export --app kolourpaint\r\n$ exit<\/pre>\n<p>Run the exported app from the host.<\/p>\n<pre>kolourpaint<\/pre>\n<p>Stop and remove a box.<\/p>\n<pre>distrobox stop UbuntuBox\r\ndistrobox rm UbuntuBox<\/pre>\n<p>See the full list of supported distros and versions at [<a href=\"https:\/\/github.com\/89luca89\/distrobox\/blob\/main\/docs\/compatibility.md#containers-distros\">Link<\/a>].<\/p>\n<hr \/>\n<p><strong>ADVANCED USAGE<\/strong><\/p>\n<p>Create an ephemeral box that self-destructs on exit.<\/p>\n<pre>distrobox-ephemeral create -n KaliBox --image kali-rolling<\/pre>\n<p>Run a command on the host from inside a box.<\/p>\n<pre>distrobox-host-exec distrobox ls<\/pre>\n<p>Export an app with sudo, list, or remove exported apps.<\/p>\n<pre>$ distrobox-export --sudo appName\r\n$ distrobox-export --list-apps\r\n$ distrobox-export --delete appName<\/pre>\n<p>Upgrade one or all boxes.<\/p>\n<pre>distrobox-upgrade KaliBox\r\ndistrobox-upgrade --all<\/pre>\n<p>Create a box owned by the root user.<\/p>\n<pre>distrobox create -n UbuntuBox --image ubuntu:24.04 --root\r\ndistrobox enter --root UbuntuBox<\/pre>\n<p>Clone an existing box.<\/p>\n<pre>distrobox stop KaliBox\r\ndistrobox create --name KaliClone --clone KaliBox<\/pre>\n<p>Enable Nvidia support when creating a box.<\/p>\n<pre>distrobox create --nvidia --name UbuntuNvidia --image ubuntu:latest<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DistroBox is an automation tool for deploying distribution-like containers in a terminal [Link]. It can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-4079","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4079"}],"version-history":[{"count":5,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4079\/revisions"}],"predecessor-version":[{"id":5626,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4079\/revisions\/5626"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}