To set up a cloud server, one of the first things you need to do is install an operating system. In a modern context, this means a Linux operating system almost all of the time. Historically, both Windows servers and other types of Unix were popular in specific commercial contexts, but almost everyone now runs Linux due to its broad support, free or flexible licensing, and overall ubiquity in server computing. There are many Linux distributions available, each with their own maintainers, with some backed by commercial providers and some not. The distributions detailed in the following sections are some of the most popular operating systems for running cloud servers.
Ubuntu is one of the most popular Linux distributions for both servers and desktop computers. New Ubuntu versions are released every six months, and new long-term support versions of Ubuntu are released every two years and supported for five. Most educational content about Linux reflects Ubuntu due to its popularity, and the breadth of available support is a significant point in its favor.
Debian is upstream of Ubuntu, meaning its core architectural decisions usually inform Ubuntu releases, and it uses the same .deb package format and
apt package manager that Ubuntu uses. Debian is not as popular for production servers due to its conservative packaging choices and lack of commercial support. However, many users pick Debian due to its portability and its use as a baseline for many other Linux distributions on different platforms, including Raspbian, the most popular Raspberry Pi OS.
Red Hat Enterprise Linux or RHEL, is the most popular commercially supported Linux distribution. Unlike the Debian family, it uses .rpm packages and a package manager called
dnf, along with its own ecosystem of tools. For licensing reasons, Red Hat is only used where there is a commercial support agreement in place.
Rocky Linux is downstream of Red Hat the way that Ubuntu is downstream of Debian, and unlike RHEL is free to use like most other Linux distributions, making it a popular choice for users that have adopted Red Hat tooling but may not be using Red Hat’s commercial support. Previously, a distribution called CentOS filled the same role as Rocky Linux, but it is being deprecated. Rocky Linux versions track closely with RHEL versions, and most documentation can be shared between the two.
Fedora Linux is upstream of Red Hat, and like Ubuntu, is used in desktop environments as well as on servers. Fedora is the de facto development home of most RHEL ecosystem packages, as well as of the Gnome desktop environment, which is used as a default by Ubuntu and others.
Arch Linux is another popular desktop-focused Linux distribution which is not a member of either the Debian or the Red Hat Linux family, but provides its own unique packaging format and tools. Unlike the other distributions, it does not use release versioning of any kind — its packages are always the newest available. For this reason, it is not recommended for production servers, but provides excellent documentation, and can be very flexible for knowledgeable users.
Alpine Linux is a minimal Linux distribution which does not provide many common tools by default. Historically there have been many Linux distributions created with this goal in mind. Alpine is commonly used in modern containerized deployments such as Docker, where your software may need a virtualized operating system to run in, but needs to keep its overall footprint as small as possible. You would generally not work directly in Alpine Linux unless trying to prototype a container.
Previously, there were more differences between distributions in their choice of init system, window manager, and other libraries, but nearly all major Linux distributions have now standardized on systemd and other such tools.
Choosing a Distribution
There are many other Linux distributions, but most of the others can be currently understood in relation to these seven. As you can tell from this overview, most of your selection criteria for Linux distributions will come down to:
- Whether you have requirements for a Debian-derived or a Red Hat ecosystem
- Whether you will be developing primarily for the cloud, or the desktop, or in a container
- Whether you need to use the newest available, or stable packages
Choosing a distribution is down to preference, but if you are working in the cloud and do not have any production requirements for the Red Hat ecosystem, Ubuntu is a popular default choice. You can also review the available packages for a given distribution from their web-facing package repositories. For example, the Ubuntu 22.04 “Jammy Jellyfish” packages are hosted under the Jammy section of Ubuntu.com.
Most Linux distributions also differ significantly in how third-party packages — packages not available from the repository’s own package sources — are created, discovered, and installed. Red Hat, Fedora, and Rocky Linux generally use only a few popular third party package repositories in addition to their official packages, in keeping with their more authoritative, production-minded approach. One of these is the Extra Packages for Enterprise Linux or EPEL. Because the RHEL ecosystem draws a distinction between packages that are commercially supported and those that aren’t, many common packages that are available out of the box on Ubuntu will require you to configure EPEL to install them on Red Hat. In this and many other cases, which packages are available upstream from your distribution’s own repositories is often a matter of authoritativeness and maintenance responsibility more than anything else. Many third-party package sources are widely trusted, they may just be out of the scope of your distribution’s maintainers.
Ubuntu allows individual users to create PPAs, or personal package archives, to maintain third-party software for others to install. However, using too many PPAs concurrently can cause incompatibility headaches, because Debian and Ubuntu packages are all versioned to have specific requirements, so PPA maintainers need to match Ubuntu’s upstream updates fairly closely. Arch Linux has a single repository for user-submitted packages, fittingly called the Arch User Repository or AUR, and although their approach seems more chaotic by comparison, it can be more convenient in practice if you use dozens of third-party packages.
You can also avoid adding complexity to your system package manager by instead installing third-party software through Homebrew or through Docker. Although “Dockerized” or containerized deployments can be inefficient in terms of disk usage and installation overhead, which is where Alpine Linux comes into consideration, they are portable across distributions and do not impose any versioning requirements on your system. However, any packages not installed by your system package manager may not receive automatic updates by default, which should be another consideration.
In this tutorial, you reviewed some of the most important considerations in choosing a Linux distribution for your cloud. The now-widespread use of Docker and other container engines means that choosing a distribution is not quite as impactful in terms of the software you’re able to run as it was in the past. However, it still factors heavily into how you’ll obtain support for your software, and should be a significant consideration as you scale your infrastructure for production.
To learn more about how to work with the system package manager on different Linux distributions, refer to Package Management Essentials.