POSTED ON 22 AUG 2023
READING TIME: 10 MINUTES
To start with, we need to cover some fundamental definitions. What is a Linux distribution, I don’t think, needs explaining. What needs explaining and is often thrown into one bag are the types of distributions listed above. So what is this all about?
As you can imagine, this can be mixed and matched however you want, minimal and monolithic, monolithic and immutable. This just boils down to the use case, what specific user needs and wants in their system. Each property gives different possibilities and has its advantages and flaws that need to be considered before deciding to switch to it.
No, in fact - quite the opposite. Of course, a typical server or desktop OS doesn’t have these properties, and can and will work perfectly fine. But in some applications, it’s just convenient and easier to use for example minimal, monolithic or immutable distribution, both in server and in desktop space.
Let’s say we want to run a HA redirection proxy for our critical service. Yes, of course, we can use a typical, full-featured Linux server distribution, such as RHEL, SUSE, or UBUNTU, and it will work perfectly fine. But this needs resources - even as a virtual machine a typical server OS needs at least 10 GB of storage, 2 vCPUs and at least 1 GB of RAM, it’s just the bare minimum. On top of that, we need to consider regular updates. All of that is for one package, that we will set up once and not change for the next 2, 5 or 10 years. How convenient would it be to shrink this VM to just 2 GB of storage, 1 vCPU and 256 MB of RAM, set it and leave, knowing it will automatically update, backup and rollback if something goes wrong? Paired with a reproducible installation feature, such as Ignition in Fedora CoreOS, where you can deploy as many preconfigured servers as you like with one network-hosted file this sounds like a perfect solution.
And what if a company wants to have a simple, free, easy to use OS for their office workers, where they absolutely can not break anything? In this case, immutable desktop Linux distributions come into play, such as Fedora Silverblue/Kinoite, NixOS or VanillaOS. Their end users don’t have to worry about installations, configuration, or updates - the filesystem is read-only, updates are atomic (meaning they are committed fully or not committed at all), and users only have access to their home directory. Of course, they still can install applications they need from distro-agnostic packaging formats, such as Flatpak, Snap or AppImage, however, these applications are sandboxed, isolated from the main filesystem and even if they’re hacked or break, absolutely nothing happens to the OS itself. As a fun fact - MacOS is mainly an immutable OS and works on the same premise as the aforementioned NixOS or Fedora Silverblue.
Here we have to make an important distinction between server and desktop OS. Both can be vastly different, and immutability is more prevalent in desktop space, whereas minimalism and monolithicity are rather associated with servers.
Here are some server examples:
And here’s a list of desktop examples:
Well first of all they’re quite new. Immutability started gaining popularity only a few years ago and only in the Linux space, and as we all know - people don’t like changes. Especially in enterprise space, where if something works it mostly is being left untouched, in fear of breaking something. Why should a company switch their production website from an “old and trusty” Ubuntu (pun intended) server to this new and unexplored CoreOS, if it still works? What, they’re expected to abandon placing config files all around the filesystem and instead use containers? This mindset is starting to change but it’s a long way off being commonplace.
The second reason partially connects with the first - this requires a complete change of approach. Realising that you’re not supposed to tamper with anything outside your home directory and that everything should be concise and compressed in one place can be hard. A great example of this is Jenkins on Kubernetes. The old, traditional way is to have a server or virtual machine with a master node and several separate servers/virtual machines with huge amounts of disk space and resources as build agents. It was done this way for years. But the current consensus is to have agents as stateless containers, run on Docker or better yet, on Kubernetes, with no disk space, spun up when they are needed to do their job, push artifacts outside and be deleted.
The third reason, which is strictly connected to using desktop immutable distros, is just that… Linux desktop is not very popular in the first place. Recently it reached 3% of the market share on desktops, but it’s still a far cry from Windows, MacOS, or even ChromeOS for that matter. And among this small percentage of users, an even smaller percentage will use immutable distros, because of reasons one and two. Plus, most Linux users are tinkerers who like to mess around and change their system, and immutability directly forbids them from doing that.
The fourth and final cause is - they are only fit for some use cases. While it’s easy to imagine a web server, Jenkins agent, or even a proxy server as a container, certain things just cannot be run this way. Things like VPN servers, DNS servers, and databases are just not meant to be stateless and discardable. While there are solutions to this, such as MariaDB or PostgreSQL containers, they are rather not recommended and not widely used in production environments, simply because of the need for data persistence in case of databases and extensive, frequent configuration changes in case of VPN or DNS. Some obstacles just cannot be overcome, at least not right now.
As in most things in life, it boils down to this - a habit is the enemy of change. We might see a surge in the popularity of such server solutions as time passes, when younger, technology-enthusiastic people will start their careers in tech with fresh minds and no habits. As much as many hate to admit it - this is the future, and even Microsoft recently switched Azure services to custom-made immutable Linux distribution instead of keeping Microsoft Server and RedHat Enterprise Linux as they used to.
And when it comes to desktop distributions - personally, I don’t think they will be much more than a fun novelty, at least not until big companies decide to switch from Windows and MacOS to Linux for their desktop needs. I really doubt that’ll ever happen though.