this post was submitted on 19 Jan 2024
183 points (88.0% liked)

Linux

47940 readers
1209 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

TL;DR: It's basically a WSL for Linux. Linux subsystem for Linux if you will.
It let's you install and use pretty much any software ever written for Linux, including AUR packages and graphical apps, on any distro you want. You should all give it a try!


Distrobox is probably the best thing ever.
If bread existed in the Linux world, Distrobox would be the equivalent, or better than sliced bread.
It just solves many of the problems that plagued us in the past!


I'm just sick of answering so many comments or posts where people either

  • almost dislocate their joints in trying to get some software working on their distro, where it isn't officially supported;
  • or choose/ leave a particular distro based on the amount of available packages, e.g. Arch.

**The answer is simple: use fucking containers. **

Before I turned into a weird "immutable distro"-user, I slapped every random install onto my host OS.
After all this shit building up over years, and cluttering my system, it turned against me. Repos not being available, packages conflicting, weird icons popping up, and more. It was a mess!

If one did that on a server, he would probably get slapped by the Selfhosted-community.
If there's Docker, Podman and more, especially for servers, why don't we use it for desktop too?

Some guy probably thought the same and made Distrobox.
You can just download BoxBuddy as Flatpak and/ or install it via package manager.
BoxBuddy is a graphical frontend, that helps you manage and use your containers. It's pretty new tho and is still in heavy development.
Traditionally, Distrobox is CLI-only, but I can see that changing in the near future.


"Why not just use a VM?"

Those containers aren't isolated and barely draw additional resources. Actually, they're somewhat comparable to Flatpaks.
They provide themselves with their stuff they need, but aren't virtualized. The main difference between Flatpaks and DB-containers for myself is that Flatpaks have permissions.

They can and will interact with your host. For example, if I plug in my phone, I can access it via ADB in my Arch container. Or my Nextcloud-client can open my browser and auto start on boot.


Who needs that?

Everyone. Well, maybe. Depends.

Image distros

Certainly users of image based ("immutable") distros like Fedora Silverblue and other variants of this family, like uBlue (Bazzite, etc.).
While we actually could install every package from the Fedora repo traditionally on our host, this should be avoided.
Steam Deck users would benefit strongly too, since they can only use Flatpaks atm.

People who can't get some packages with their distro

One of the main arguments, why so many users go or stay on Arch, is the AUR.

Often, they have a love-hate-relationship with it. It might break easily if you do something wrong, which is easily done for many users. At the same time, it gives them their niche software they need.

What if I told you, that you can enjoy this huge plus point for Arch on every other distro too, while benefiting from the comfort of your favourite distro?

You can even install an Ubuntu container and use Snaps there if you enjoy using them.

Developers

On the stock Fedora Silverblue, there's Toolbx pre-installed, which does something very similar, but not as good. It's a RedHead product.
On uBlue on the other hand, Distrobox is the default, which is better.

Toolbx' main use case is programming. For devs working with different Python-versions for example and don't wanna risk breaking their OS.

DB does the same, but more.


But why is it so powerful?

You can also export your software to your host.
E.g., the Flatpak version of Nextcloud didn't work well for me. The Arch package on the other hand is less buggy and looks properly. It's perfectly integrated in my system and I don't notice it at all that it hasn't been installed natively.

This even extends to DEs and TWMs! You could, for example, create an Arch container only for Hyprland, which you basically can't install on other distros.
And then, you can use said example, or the beta-version of the new Plasma, on OpenSuse Leap.

On uBlue at least, all my containers update themselves too.

Another great thing is the modularity.
You can, for example, just delete the Arch container if it breaks randomly or due to user error, without worrying about losing access to your PC or having to troubleshoot for hours.


All in all, just try it. Trust me.

(page 2) 29 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

I think it depends on what you want to accomplish.

I agree Distrobox is perfect for any case you want to use software your distro doesn't support (you basically setup the target distro into a docker container), or for developers wanting to use different versions of software/libraries without risking breaking the host OS with tons of different packages that might conflict with each other, but I wouldn't say it can also completely replace the use of VMs.

For example, using a VM is the only way for me to use Linux on my company PC (Windows), it's easy to get permission to install Virtualbox/Vmware since VMs are isolated from your host and you can cut them out from the company network, it's an opposite use case than what you would use containers for.

VMs are fantastic to learn, trying the setup of a different distro if you're distro hopping or simulating multiple machines interacting with each other, you can't do that with containers.

[–] [email protected] 1 points 9 months ago (1 children)

Just curious. I tried distrobox and it wasn't that easy. Isn't flatpak+appimage+nix better alternative?

[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

There is no good and bad. Every format or solution has other pros, cons, and especially use cases.

Flatpak is simple and for GUI only.
Appimage is portable.
Nix is reproducible and developer friendly, but pretty complicated too.

And Distrobox' main advantage is that you can use any container-distro.
If you want some software that only runs on Ubuntu, Nix won't get you far.
It might not be perfect (see other comments for examples), but for some use cases, it's the best solution.

As long as it gets you to your goal, anything is good.
Hell, even Snaps can be a good choice if you need some specific software and this format provides you easy access to that. Personal choice and such...

[–] [email protected] 1 points 9 months ago

So a question re distrobox. Can it be used to run additional isolated sessions, say via Xephyr or something, that share host resources without abstraction?

Basically, I want to host two additional KDE sessions in Zephyr (or something) and then run Steam and sunshine in, and point my kids respective clients to them.

Or with PCI pass thru, but I'm trying to avoid that.

Can Distrobox help me accomplish this in any way?

[–] [email protected] 1 points 9 months ago (1 children)

You can even install an Ubuntu container and use Snaps there if you enjoy using them.

The point of Snaps is that they work on any distro

load more comments (1 replies)
[–] [email protected] 1 points 9 months ago (4 children)

distrobox = WSL in Linux world

[–] [email protected] -2 points 9 months ago

Flatpak = things properly done.

load more comments (3 replies)
[–] [email protected] 0 points 9 months ago* (last edited 9 months ago) (1 children)

Meh nah because it uses docker or podman as backend which is like how netplan uses several backends which plug into more backends.

Big and advance programs tend to break or lose performance because of the yet another added layer of config.

Linux comes with LXC which works out of box, yet everyone is always running to make another useless container layer because they all want their own config management standard.

LXD, Docker, Podman, Toolbox, etc. God forbid you try to run more than one of these at the same time.

Moreover, Flatpak solves this issue by acting as a pseudo container which at the very least removes potential performance loss.

spoiler

Immutable machines and containerized software are for losers who don't know how to run git clone && make in a terminal /s

load more comments (1 replies)
load more comments
view more: ‹ prev next ›