11 ms·
Distrobox: Use any Linux distribution inside your terminal
- j16sdiz 3y agoWho are the target audience? For non-admin task, I don't think there are much different between distro. For admin task, this won't go too far...
- forgotmypw17 3y agoI can see this being useful for testing foss project installability
- squarefoot 3y agoPossibly testing builds for different distros in parallel.
- fulafel 3y agoThis is what the README says about use cases: > Why > Provide a mutable environment on an immutable OS, like Endless OS, Fedora Silverblue, OpenSUSE MicroOS or SteamOS3 > Provide a locally privileged environment for sudoless setups (eg. company-provided laptops, security reasons, etc...) > To mix and match a stable base system (eg. Debian Stable, Ubuntu LTS, RedHat) with a bleeding-edge environment for development or gaming (eg. Arch, OpenSUSE Tumbleweed or Fedora with latest Mesa) > Leverage high abundance of curated distro images for docker/podman to manage multiple environments
- FireInsight 3y agoFor every immutable distro I've considered distrobox or smth similar is the main or secondary way of installing stuff. VanillaOS has apx which is a wrapper for podman, BlendOS is basically built on the idea of distroboxes, and uBlue (which I'm using), ships distrobox and recommends it's usage.
- FireInsight 3y agoShould include project name in title (distrobox). This is really a game changer for immutable distros. I use Fedora Kinoite and basically everything I use is in an Arch distrobox or flatpak. Best part is, you can just throw a box in the trash and create a new one with only stuff you need. Distrobox-assemble will simplify it further.
- pkulak 3y agoNever heard of distrobox-assemble, but it sounds intriguing. I currently let Microsoft build and host my container once a week: https://github.com/pkulak/boxkit https://github.com/pkulak/boxkit And yeah, like you, I basically live in Arch despite running Fedora. My terminal opens directly into the Arch container, and I’m even installing more and more GUI apps in there, since they are so easy to export to my host launcher.
- 000ooo000 3y agoWhat is it that you like about running Arch within Fedora, vs. just running Arch (or any other alternatives you have tried)? I run an Arch VM on Windows; I started out setting up Arch in the VM while experimenting with booting into Arch raw (it's installed on a dedicated, physical disk), but I became distracted and never perfected the raw boot setup, so I just use it as a VM, which I tolerate. The idea of Distrobox intrigues me but I'm not imaginative enough to see how it would help me, so I'm keen to hear your thoughts. Edit: ah I got to the part of your repo where you mention the below, and I'm watching your video (https://youtu.be/7-FPAWjROos https://youtu.be/7-FPAWjROos). Makes sense. >Also, I've never gotten really to know Alpine, the problem with running distros like this bare metal on my PC is that there's a whole bunch of hardware quirks and all sorts of little enablement things that more generalized distros tend to get right.
- Lapsa 3y agoBTW I Use Arch
- LeFantome 3y agoNot the OP but one nice thing about Arch is the AUR. Practically everything you could want per-packaged and up-to-date. Distrobox let’s you have this killer Arch advantage on whatever base distro you want. Maybe you love Debian but find the outdated packeges an issue ( fixed ). Perhaps you love Apline but cannot afford to fight with Musl compat ( fixed ). I love the idea of Chimera Linux and would love to daily drive it. However, package availability is going to be a constant drag. Oh, and it uses Musl as well. Both these problems go away running Distrobox / Arch on top. I could keep the base system clean and simple while having a dev environment that is frictionless and full featured ).
- valvix 3y agoDistrobox is amazing, been using it on silverblue to have all my coding in an arch container
- Paul-Craft 3y agoSee also blendOS, where you can also install Android and web apps. https://www.linux-magazine.com/Online/News/Arch-Based-blendOS-Features-Cool-Trick https://www.linux-magazine.com/Online/News/Arch-Based-blendO...
- rahimnathwani 3y agoBlendOS is based on Distrobox.
- Paul-Craft 3y agoThat's not what the article I linked says.
- rahimnathwani 3y agoApologies... my info was a couple of months out of date. It used to be based on Distrobox but they announced a few months ago that they were building a replacement using podman, so now it seems they're only using Distrobox for a couple of things.
- samarthr1 3y agoHow is it different from Toolbox? (https://github.com/containers/toolbox https://github.com/containers/toolbox)
- maxboone 3y agoFYI, Toolbox mounts your entire home into each instance (and you can't run separate HOMEs for each instance, as not everything adheres to $HOME all too well). This completely ruined the experience for me.
- Gigachad 3y agoI think this is typically, but not always, what you want. All of my usage of toolbox was using tools installed inside a container to operate on files in my home.
- edwintorok 3y agoDistrobox also works on top of other distributions like Ubuntu.
- freeCandy 3y agoToolbox can run anywhere podman can, so it should work just fine on Ubuntu too.
- darrenf 3y agoQuoting the README: It implements the same concepts introduced by https://github.com/containers/toolbox but in a simplified way using POSIX sh and aiming at broader compatibility. All the props go to them as they had the great idea to implement this stuff.
- weinzierl 3y agoThis is an excellent puzzle piece for testing your software in different environments. What I'm looking for in addition to something like Distrobox is away to easily test with older kernel versions. Does anyone know a tool that makes this easy, easier than juggling VM's manually?
- edwintorok 3y agoI've been using this on top of both Ububtu and Fedora Silver blue, to run a Fedora toolbox, works nicely. There is also a host-exec script that allows to spawn commands outside the container while inside. E.g. it is not possible to run 'podman' nested, but with host-exec can still run containers while inside distrobox (distrobox isn't used for isolation, but for the ability to run a mutable OS of your choice). There are a small number of programs, usually those that need root (such as 'cpupower') which also need to be run "outside".
- artemonster 3y agoAlso long before there was "Junest" that did same thing based on chroot
- freeCandy 3y agoJunest is really good, although it only runs Arch
- msla 3y agoThat seems more fragile, in that chroot isn't meant to keep things as well-contained as cgroups are.
- blueflow 3y agoNamespaces do that, not cgroups.
- PeterWhittaker 3y agoContainers need both namespaces and groups. While created for different purposes, both serve the same purpose within the container world: Giving processes within a container a limited set of actual host capabilities. If cgroups hadn't already existed, we likely would have a namespace that did the same thing; as it is, we had cgroups, so we didn't that namespace.
- blueflow 3y agoThis similarity is constructed. Namespacing is largely about entry points into kernel data structures, while cgroups are a form of active accounting. They are orthogonal, and the existence of the cgroups namespace (=the intersection of both) illustrates that.
- netzego 3y agoFor testing i prefer systemd-nspawn containers with mkosi. A neat tool for running your other fav. distro in a terminal. Works like a charm and integrates nicely in your system. Eg. logs and systemd services or CI testing. - https://github.com/systemd/mkosi https://github.com/systemd/mkosi - man:systemd-nspawn(1) - man:machinectl(1)
- nixcraft 3y agoInteresting. I always used LXD. It supported many distros too. You can quickly spin up an LXD container that matches the desired cloud instance type. I can create EC2-like t2.micro instance on local Ubuntu/Debian and see how my app would behave on a cloud instance locally on my workstation. LXD also supports GUI apps and NVIDIA GPU acceleration. I will test this one.
- gigatexal 3y agothis lxd approach sounds cool -- do you have a blog post or youtube video showing it or one that you would offer as a goto?
- nixcraft 3y agoYes, please see "How To Install LXD on Debian 11 Linux" [0] and search for AWS or GUI examples. FYI, upcoming Debian 12 will install LXD via APT and you no longer need snaps. [0] https://www.cyberciti.biz/faq/how-to-install-lxd-on-debian-11-linux/ https://www.cyberciti.biz/faq/how-to-install-lxd-on-debian-1...
- gigatexal 3y agoThank you!
- madmulita 3y agoIn [1] Stéphan Graber, lxd project lead, regularly demos new features. https://www.youtube.com/@LXD https://www.youtube.com/@LXD https://linuxcontainers.org/lxd/introduction/ https://linuxcontainers.org/lxd/introduction/
- dizhn 3y agoThe difference here is, your home directory is tightly integrated. This is something most (all) all virtualization solutions try to avoid. With support for running GUI applications, this becomes a viable solution for running apps from other distros, running an app as root when you aren't, and being able to install apps into a system that is immutable. It is also a lot really really fast to enter that session. (It uses podman or docker rather than lxc like with LXD)
- puzzledobserver 3y agoI wonder how Distrobox compares to nix shell. If I understand correctly, Distrobox makes it convenient to launch (and destroy) lightweight VMs on demand, while nix shell makes it convenient to drop into a shell with some package installed. The documentation around nix has unfortunately been unapproachable in my experience. Of course, Flatpaks+Podman will be a learning curve, but I'm eager to try Silverblue+Distrobox on one of my computers.
- yonatan8070 3y agoFrom what I understand DistroBox creates a container, not a virtual machine. The difference is that containers share the host's resources and kernel, while a VM is completely seperate
- puzzledobserver 3y agoIndeed, by "lightweight VM", I meant a container of the kind provided by Podman and Docker.
- drKarl 3y agoThe experimental Sandboxed Mode sounds interesting, there should be a dedicated fork focused on sandbox mode replicating QubesOS with containers rather than VMs.
- NayamAmarshe 3y agoDistrobox is awesome! No need to fight with my Ubuntu based distro for new packages anymore. I just install everything in my arch box now and it works nicely. Stability of Ubuntu with the power of pacman, definitely a great tool!
- vrglvrglvrgl 3y ago[dead]
- johnchristopher 3y agoHow does it handle EOL distros like Debian 7 for which packages are not available anymore ? I need to compile the most recent version possible of rsync (or one with some specific zip support) for Debian 7 but I can't install the build tools in Debian 7 in docker :/. What I got so far: $ docker run -it debian/eol:wheezy /bin/dash # apt-get update E: Method http has died unexpectedly! E: Sub-process http received a segmentation fault.
- ranting-moth 3y agoBy the very nature of EOL, I'd be very surprised if you find someone or something that supports it, let alone for free.
- johnchristopher 3y agoYes, I somehow thought those repositories would be up forever, just never updated again.
- Hendrikto 3y agohttp://archive.debian.org/debian/dists/wheezy/ http://archive.debian.org/debian/dists/wheezy/
- johnchristopher 3y agoWell, I should have mentioned I already tried that: $ cat s ; docker run -it --volume ./s:/etc/apt/sources.list:ro debian/eol:wheezy /bin/dash deb http://archive.debian.org/debian wheezy main #deb http://archive.debian.org/debian wheezy main contrib #deb http://archive.debian.org/debian-archive/debian-security/ wheezy updates/main # apt-get update E: Method http has died unexpectedly! E: Sub-process http received a segmentation fault.
- blackpelican 3y agoI'm really enjoying Distrobox. With it, I've been able to develop on my Steam Deck and use it as my primary and only device. The Steam Deck default OS (Steam OS 3) is a heavily locked down variant of Arch with only a couple of writable directories. With Distrobox, I can run an Ubuntu environment from one of those directories, ensuring that when I install SDKs or tools, they're being installed to a writable area of the OS but require no config to change what they think is intended install location.
- thelastparadise 3y agoSo it's basically a chroot?
- FireInsight 3y agoWell, as much as containers are a chroot. It's also heavily integrated with the host system.
- qbasic_forever 3y agoIt passes through enough of your root filesystem so you can run systemd and a whole new pid 1 inside the 'chroot'.
- veidr 3y agoCan you tell us more about using a Steam Deck this way? Do you often use the terminal (or something like VS Code Remote extension) to do builds on a beefier machine, or do you do all your development literally on the SteamDeck hardware using tools like Distrobox? And what kind of development do you do? I ask because I need to get a new laptop, but only for the once or twice per month I go physically to the office, and was thinking a Steam Deck might make more sense than a traditional laptop that would be idle ~340 days of the year. (I can almost always get a monitor and external keyboard at the office, so it would be a rare day that I was actually stuck with the 1280×800 screen.)
- blackpelican 3y agoI'm just your average full stack JS dev and I'm not doing any interesting project in my free time besides personal website stuff. Fortunately this means I can do literally everything on the Steam Deck (besides hosting obviously[1]). What kind of development do you do? In theory, it's possible for a lot of roles. If you can get your environment working smoothly on a distro that Distrobox supports then you should be able to work on it. I'd love to see someone rock up to the office with a Steam Deck, plug it in, and just start working. That's quite the image. [1] The Steam Deck has a kind of A/B boot. By default it loads into Gaming mode and the other is Desktop mode. In Gaming mode, most apps and services aren't running (as far as I can tell but now I want to check) so I don't think you could ensure a server stays running in the background if you switched back to Gaming mode. On the other hand, you could live totally in Desktop mode and game from there, only losing the nice Gaming mode GUI.
- pmoriarty 3y agoHow does this compare to Docker?
- ThatMedicIsASpy 3y agoContainers have access to your home X11/wayland, audio, usb, can run graphical applications easily. Can be installed and used without root with podman. You can even setup booting into a container desktop environment from your login screen. https://github.com/89luca89/distrobox/blob/main/docs/posts/run_latest_gnome_kde_on_distrobox.md https://github.com/89luca89/distrobox/blob/main/docs/posts/r...
- cookieperson 3y agoThis is a good idea. Are there any down sides to using it? I feel like a proper implementation of this could reduce a lot of noise in the development experience. Some part of me wonders if you can brick your box with it or if there are less than obvious performance costs?
- Vinnl 3y agoNot an expert, but one risk when using this on an immutable OS is that your start to treat the containers like pets, ie that you're going to want to upgrade then to newer versions and have to do all the maintenance chores an immutable OS is supposed to do away with.
- jq-r 3y agoAs an occasional user of Multipass, how does Distrobox compare to it?
- ocay 3y agoDistrobox is awesome! I exclusively use it for any linux development
- apexalpha 3y agoDoes this support a full Ubuntu Desktop? At my job we test a lot of projects for which we require a load of (GUI) apps. Until now I've installed these in a VM and then reset the VM after the project so my host OS doesn't get cluttered. If Distrobox can give me a full desktop Ubuntu in a container in stead of a VM that would be very welcome. Thanks for the post, I'm diving in!
- thinker5555 3y agoIn the post link, there's a section called "See it in action" with a video, and in there he shows an example of installing gedit into a container and running it.
- LeFantome 3y agoShort answer is yes. You are probably not going to run a “full Ubuntu Desktop” though. Is that what you want? You would run your normal desktop ( from the host distro ). In Distrobox, you would have Ubuntu installed including whatever GUI apps you need. When you run those GUI apps, they appear on your regular desktop.
- apexalpha 3y agoYes my idea would be to have a full Ubuntu Desktop that I can use for a project, and then save it on our git. So when my colleagues have to work on this specific project they can just copy the container and dive in. Of course this would also work with a regular Distrobox container but that requires more terminal action than some colleagues are comfortable with. Plus it's hard to see sometimes when a GUI app is from a container and when it's on your host. It's almost too seamless. So having a single "window" into a full ubuntu container would be my preferred option.
- duckqlz 3y agoFrom the first line of the README: "Simply put it's a fancy wrapper around podman or docker to create and start containers highly integrated with the hosts"
- laputan_machine 3y agoIt's surprisingly refreshing to see a project say what it actually does
- m463 3y agothe description is also a fancy wrapper around the "docker" or "podman" words that I've found really hard to explain to people. ("docker is sort of like a vm but more like chroot, and it has a dockerfile that is sort of like a recipe, and a filesystem that is sort of like version control, but..." bleh)
- wheelerof4te 3y agoAll wrong. The only true Unix way is to use Slackware stable as base and build your own software from source. Bonus points for writing that source yourself. /s
- turtleyacht 3y agoI'm sure folks still do this. You say it in sarcasm, I know--I still was curious: Is it a matter of mastering the `make` prefixes and arguments, and/or `autoconf`, in order to exactly specify the dependencies to use?
- wheelerof4te 3y agoYes. Yes it is. Unless you want to practice or show off, just use a more advanced build tool. For simple projects, 'make' will do.
- anogrebattle 3y agoLove it! I've been evangelizing Distrobox in my lab. We do robotics and often have to interface with machines running outdated distros or outdated software. Distrobox has made it trivial to spin up containers running arbitrary versions of whatever we need, while keeping our host machines up to date. In fact, today I'm running hardware demos where I'm controlling an arm by dispatching commands through an ancient version of ROS that I set up with Distrobox.
- Vinnl 3y agoDoes anyone know why Fedora Silverblue includes Toolbox instead of Distrobox by default?
- 16bitvoid 3y agoIIRC, Toolbox is less buggy and better tested according to some discussions on both Fedora Silverblue's and Toolbox's GitHub issue trackers. I don't have links on-hand (mobile), but the discussions should be easy to find by searching "distrobox" in the issue page of the respective GitHub repos. I also can't speak to the validity of it since I haven't really had problems with either.
- LeFantome 3y agoToolbox came first
- beardog 3y agoFor me the biggest selling point is being able to install things from official or more trustworthy sources than I can otherwise. For example Signal does not show any official way to run the desktop app on Fedora, but I trust the Archlinux community repo so I can just install it on an Arch distrobox environment and add a launcher for it to my bin. This beats the unofficial Flatpak in my opinion.
- deleted 3y ago[deleted]
- Levitating 3y agoIf you want to actually use multiple distributions at once integrated tightly into each other (like using Ubuntu with AUR packages) I highly recommend https://bedrocklinux.org/ https://bedrocklinux.org/. It uses some chroot and symbolic link magic to share files across filesystems.
- ktaylora 3y agoLove distrobox. Use it on my daily driver. If you are running an Ubuntu LTS / Debian stable / PopOS as your main operating system (because you want stability), but want to run bleeding-edge gui applications in debian testing (or even unstable) in an isolated container, you can. Running GUI applications in Linux containers is usually non-trivial to set-up, but distrobox makes it painless. Install with apt, export to the host operating system with 'distrobox-export --app blah'.
- mixmastamyk 3y agoIs this easier/less invasive than flatpack? I removed snap for this reason.
- akvadrako 3y agoHow is flatpak invasive? It's pretty much the same from the outside; the difference is how the containers are built and managed. Flatpak uses OSTree with custom build scripts, while distrobox uses Dockerfiles and more standard packaging.
- mixmastamyk 3y agoOh, I meant snap was invasive. Also, wondering how distrobox compares to flatpak re "invasiveness."
- omani 3y agoI use LXD. I can spawn any distro I want. I also use GUI apps this way (including video/audio eg firefox). I also use chezmoi for different HOME environments I want to have inside my LXD containers.
- _piif 3y agoIt's what allowed me to make the jump to NixOS without having to give up much - every userspace program that isn't packaged up or has quirks along with anything gaming related where I consistently want the newest and greatest runs inside an Arch distrobox container. Can highly recommend!
- pm2222 3y agoExtracting rootfs.tar and “systemd-nspawn -D <rootfs-dir>” is what I do. Pretty neat.