Choosing Your Linux

Why This Matters

You have just accepted a new job as a junior DevOps engineer. On day one, your team lead says: "Spin up two servers -- one Ubuntu 22.04 for the web tier, one Rocky Linux 9 for the database tier." You nod confidently, but inside you are thinking: Why two different distributions? What is the difference? Does it matter?

It does matter. Distributions differ in their package managers, release schedules, default configurations, security models, community support, and commercial backing. Choosing the wrong distribution for a task can mean fighting your tools instead of using them. Choosing the right one means your environment works with you.

This chapter maps the Linux distribution landscape so you can make informed choices -- whether you are setting up a learning environment, a personal desktop, or a production server fleet.


Try This Right Now

If you have any Linux system available, let us immediately figure out what distribution and family you are running:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu
ID_LIKE=debian
VERSION_ID="22.04"
PRETTY_NAME="Ubuntu 22.04.3 LTS"

Two key fields:

  • ID tells you the exact distribution (ubuntu)
  • ID_LIKE tells you the family it belongs to (debian)

Now check which package manager is available:

$ which apt dnf pacman zypper 2>/dev/null
/usr/bin/apt

Whatever comes back tells you which distribution family you are in. If you see apt, you are in the Debian family. If dnf, the Red Hat family. If pacman, the Arch family. If zypper, the SUSE family.


What Is a Distribution?

In Chapter 1, we established that Linux is a kernel. A distribution (distro) takes that kernel and adds everything needed to make a usable operating system:

┌─────────────────────────────────────────────────┐
│            Linux Distribution                    │
│                                                  │
│  ┌────────────────────────────────────────────┐  │
│  │  Kernel (shared across all distros)        │  │
│  │  (possibly with distro-specific patches)   │  │
│  └────────────────────────────────────────────┘  │
│                                                  │
│  ┌────────────────────────────────────────────┐  │
│  │  Core Userspace:                           │  │
│  │  - Init system (systemd, OpenRC, runit)    │  │
│  │  - Shell (bash, zsh)                       │  │
│  │  - Core utilities (coreutils)              │  │
│  │  - System libraries (glibc, musl)          │  │
│  └────────────────────────────────────────────┘  │
│                                                  │
│  ┌────────────────────────────────────────────┐  │
│  │  Package Management:                       │  │
│  │  - Package manager (apt, dnf, pacman)      │  │
│  │  - Software repositories                   │  │
│  │  - Dependency resolution                   │  │
│  └────────────────────────────────────────────┘  │
│                                                  │
│  ┌────────────────────────────────────────────┐  │
│  │  Extras (varies by distro):                │  │
│  │  - Desktop environment (GNOME, KDE, none)  │  │
│  │  - Default applications                    │  │
│  │  - Configuration tools                     │  │
│  │  - Branding and theming                    │  │
│  └────────────────────────────────────────────┘  │
│                                                  │
└─────────────────────────────────────────────────┘

Every distribution makes choices: which kernel version to ship, which init system to use, how to manage packages, what default software to include, and how frequently to release updates. These choices create the identity and trade-offs of each distribution.


The Major Distribution Families

There are hundreds of Linux distributions, but nearly all descend from a handful of families. Understanding the families is more important than memorizing individual distros.

The Debian Family

Debian (1993)
├── Ubuntu (2004)
│   ├── Linux Mint
│   ├── Pop!_OS
│   ├── Elementary OS
│   └── Kubuntu, Xubuntu, Lubuntu (flavors)
├── Kali Linux (security/pentesting)
├── Raspberry Pi OS
└── Devuan (Debian without systemd)

Debian is the grandfather of this family. Founded in 1993 by Ian Murdock, it is one of the oldest distributions still in active development. Debian prioritizes stability and freedom above all else.

Key characteristics:

  • Package format: .deb
  • Package manager: apt (Advanced Package Tool), dpkg for low-level operations
  • Release model: Point release, roughly every 2 years
  • Philosophy: rock-solid stability, software freedom
  • Releases are named after Toy Story characters (Bookworm, Bullseye, Buster)

Ubuntu, created by Canonical in 2004, is the most popular Debian derivative. It takes Debian's foundation and adds polish, newer software, and commercial support. Ubuntu has its own release cadence:

  • Regular releases every 6 months (April and October)
  • LTS (Long Term Support) releases every 2 years, supported for 5 years
  • LTS versions are what you use on servers (e.g., Ubuntu 22.04 LTS, Ubuntu 24.04 LTS)

When to choose Debian/Ubuntu:

  • Ubuntu LTS is the most common choice for cloud servers and containers
  • Debian stable is ideal when you want maximum stability and minimal surprises
  • Enormous package repositories (over 59,000 packages in Debian)
  • Most online tutorials and guides target Ubuntu

Distro Note: When this book shows commands using apt, they apply to Debian, Ubuntu, and all their derivatives.

The Red Hat Family

Red Hat Enterprise Linux (RHEL)
├── CentOS Stream (upstream preview of RHEL)
├── Rocky Linux (community RHEL rebuild)
├── AlmaLinux (community RHEL rebuild)
├── Oracle Linux (Oracle's RHEL rebuild)
└── Amazon Linux (AWS's RHEL-like distro)

Fedora (community upstream of RHEL)

Red Hat Enterprise Linux (RHEL) is the dominant distribution in enterprise and corporate environments. Red Hat (now owned by IBM) sells subscriptions that include support, security patches, and certification.

Fedora is the community distribution that serves as a testing ground for technologies that eventually make it into RHEL. Fedora ships newer software and is more cutting-edge.

Key characteristics:

  • Package format: .rpm (RPM Package Manager)
  • Package manager: dnf (Dandified YUM), rpm for low-level operations
  • Release model: RHEL has point releases with 10-year support cycles; Fedora releases every ~6 months
  • Philosophy: enterprise stability, commercial support, certification

The CentOS Story: For years, CentOS was a free, community rebuild of RHEL -- binary-compatible, just without the Red Hat branding and support. In 2020, Red Hat controversially shifted CentOS to "CentOS Stream," an upstream preview of RHEL rather than a downstream rebuild. This broke the free-as-in-RHEL promise, and two community projects emerged to fill the gap:

  • Rocky Linux -- founded by one of the original CentOS creators
  • AlmaLinux -- backed by CloudLinux

Both aim to be 1:1 compatible with RHEL, free of charge.

When to choose RHEL/Fedora family:

  • Enterprise environments that require commercial support and certification
  • When your organization already uses RHEL (consistency matters)
  • When preparing for the RHCSA or RHCE certifications
  • Fedora for desktop users who want cutting-edge software with good stability

Distro Note: When this book shows commands using dnf, they apply to Fedora, RHEL, Rocky Linux, AlmaLinux, and CentOS Stream.

The Arch Family

Arch Linux (2002)
├── Manjaro
├── EndeavourOS
├── Garuda Linux
└── SteamOS 3.0 (Valve's gaming OS)

Arch Linux takes a radically different approach: minimalism and user control. Arch gives you nothing by default -- no desktop environment, no hand-holding, no automatic configuration. You build the system yourself, piece by piece.

Key characteristics:

  • Package format: .pkg.tar.zst
  • Package manager: pacman
  • Release model: Rolling release -- there are no "versions." You install once and continuously update
  • Philosophy: simplicity, user-centricity, cutting-edge software
  • The Arch Wiki is widely regarded as the best Linux documentation on the internet (useful even for non-Arch users)
  • AUR (Arch User Repository) -- a community repository with packages for virtually any software

When to choose Arch:

  • When you want to deeply understand how Linux works (the installation teaches you)
  • When you want the very latest software versions
  • Desktop use by experienced users
  • NOT recommended for production servers (rolling releases are unpredictable for stability)

Distro Note: When this book shows commands using pacman, they apply to Arch Linux and its derivatives like Manjaro and EndeavourOS.

The SUSE Family

SUSE Linux Enterprise (SLE)
├── SUSE Linux Enterprise Server (SLES)
└── SUSE Linux Enterprise Desktop (SLED)

openSUSE
├── openSUSE Leap (point release, based on SLE)
└── openSUSE Tumbleweed (rolling release)

SUSE is another major enterprise distribution, particularly popular in Europe. openSUSE is its community counterpart.

Key characteristics:

  • Package format: .rpm
  • Package manager: zypper
  • YaST (Yet another Setup Tool) -- a comprehensive system administration tool
  • Release model: Leap is point release; Tumbleweed is rolling
  • Strong in European enterprise, particularly Germany

When to choose SUSE:

  • Enterprise environments that already use SUSE infrastructure
  • When you want YaST for administration
  • openSUSE Tumbleweed for a polished rolling-release desktop

Other Notable Distributions

  • Alpine Linux -- tiny (5 MB base image), uses musl libc instead of glibc, and apk package manager. Extremely popular for Docker containers
  • Gentoo -- compiles everything from source for maximum optimization. Uses emerge package manager. Deep learning experience
  • Slackware -- one of the oldest surviving distributions (1993). Minimalist, does not auto-resolve dependencies
  • NixOS -- declarative system configuration. Entire OS defined in a config file. Revolutionary approach to reproducibility
  • Void Linux -- independent distribution using runit init system instead of systemd

Think About It: Why do you think there are so many Linux distributions? In most other software ecosystems, there is one dominant option. What about Linux encourages this diversity?


Package Managers: The Heart of a Distribution

The package manager is arguably the single most important difference between distribution families. It determines how you install, update, and remove software.

What a Package Manager Does

┌─────────────────────────────────────────┐
│         Package Manager                  │
│                                          │
│  1. Downloads software from repositories │
│  2. Resolves dependencies automatically  │
│  3. Installs files to correct locations  │
│  4. Tracks what is installed             │
│  5. Handles upgrades and removals        │
│  6. Verifies package integrity (GPG)     │
│                                          │
└─────────────────────────────────────────┘

Without a package manager, installing software means manually downloading source code, resolving dependencies by hand, compiling, and tracking what you installed. Package managers automate all of this.

Side-by-Side Comparison

Taskapt (Debian/Ubuntu)dnf (Fedora/RHEL)pacman (Arch)
Update package listapt updatednf check-updatepacman -Sy
Upgrade all packagesapt upgradednf upgradepacman -Syu
Install a packageapt install nginxdnf install nginxpacman -S nginx
Remove a packageapt remove nginxdnf remove nginxpacman -R nginx
Search for a packageapt search nginxdnf search nginxpacman -Ss nginx
Show package infoapt show nginxdnf info nginxpacman -Si nginx
List installed packagesdpkg -lrpm -qapacman -Q
Which package owns a filedpkg -S /usr/bin/vimrpm -qf /usr/bin/vimpacman -Qo /usr/bin/vim

The syntax differs, but the concepts are identical. Once you understand one package manager deeply, learning another takes hours, not days. Chapter 57 dives much deeper into package management.

Think About It: Why do you think Linux uses centralized package repositories instead of having users download installers from individual websites (like Windows traditionally does)? What security and reliability advantages does this provide?


Release Models: Rolling vs Point Release

This is one of the most consequential choices a distribution makes.

Point Release (Fixed Release)

Examples: Debian, Ubuntu LTS, RHEL, Rocky Linux, openSUSE Leap

Timeline:
──────────────────────────────────────────────────────────>

  Ubuntu 22.04 LTS        Ubuntu 24.04 LTS
  ┌────────────────┐      ┌────────────────┐
  │ Released        │      │ Released        │
  │ Apr 2022        │      │ Apr 2024        │
  │                 │      │                 │
  │ Security fixes  │      │ Security fixes  │
  │ only until      │      │ only until      │
  │ Apr 2027        │      │ Apr 2029        │
  └────────────────┘      └────────────────┘
  • Software versions are frozen at release time
  • Only security patches and critical bug fixes are backported
  • Major software upgrades require upgrading to the next release
  • Pros: predictable, stable, well-tested combinations of software
  • Cons: software versions can feel old; you may need newer features

Point release distributions are the standard for servers. You do not want your production database server spontaneously updating to a new major version of PostgreSQL.

Rolling Release

Examples: Arch Linux, openSUSE Tumbleweed, Gentoo, Void Linux

Timeline:
──────────────────────────────────────────────────────────>
  Arch Linux
  ┌──────────────────────────────────────────────────────┐
  │ Install once, update forever                          │
  │                                                       │
  │ Kernel 6.1 → 6.2 → 6.3 → 6.4 → 6.5 → 6.6 → ...    │
  │ Firefox 110 → 111 → 112 → 113 → 114 → 115 → ...    │
  │ Python 3.11 → 3.12 → ...                            │
  │                                                       │
  │ Every update brings the latest stable version         │
  └──────────────────────────────────────────────────────┘
  • Software is continuously updated to the latest stable versions
  • There are no release "versions" -- you are always on the latest
  • Pros: always up to date, no painful upgrade cycles
  • Cons: updates can introduce breaking changes, less predictable for servers

Semi-Rolling / Hybrid Models

Some distributions blend both approaches:

  • Fedora: releases every ~6 months but moves fast between releases. Not technically rolling, but much more current than RHEL or Debian stable
  • CentOS Stream: continuously updated, slightly ahead of RHEL. A rolling preview of the next RHEL point release
  • Ubuntu non-LTS: new release every 6 months with only 9 months of support. Good for desktops, risky for servers

Choosing for Your Use Case

For Learning (This Book)

Recommended: Ubuntu LTS or Fedora

Either of these will work perfectly for every exercise in this book. Both are well-documented, widely used, and easy to install. Ubuntu LTS is the safer default because more tutorials and guides target it.

If you want to challenge yourself and learn deeply, Arch Linux is an incredible teacher -- the installation process alone teaches you partitioning, bootloaders, and system configuration.

For Desktop Daily Use

PriorityRecommended Distro
Ease of use, "just works"Ubuntu, Linux Mint, Fedora
Cutting-edge softwareFedora, Arch, openSUSE Tumbleweed
GamingArch (or Manjaro), Pop!_OS, Nobara
Privacy-focusedTails, Whonix, Qubes OS
Old/low-spec hardwareLubuntu, antiX, Puppy Linux
Beautiful out of the boxElementary OS, Fedora (GNOME)

For Servers (Production)

PriorityRecommended Distro
Cloud/web serversUbuntu LTS, Debian stable
Enterprise with support contractsRHEL, SLES
Free RHEL-compatibleRocky Linux, AlmaLinux
Container base imagesAlpine Linux, Debian slim
Maximum stability, long lifecycleDebian stable, RHEL

For Specific Roles

RoleCommon Distributions
DevOps / Cloud EngineerUbuntu LTS, Amazon Linux, Fedora
System AdministratorRHEL, Rocky Linux, Debian
Security / PentestingKali Linux, Parrot OS
Embedded / IoTYocto, Buildroot, Alpine
Scientific ComputingCentOS/Rocky (historically), Ubuntu

Hands-On: Comparing Distributions Side by Side

You do not need to install every distribution to compare them. Let us use Docker to quickly peek inside different distributions.

Note: If you do not have Docker yet, that is fine -- just read through this section. You will install Docker in Chapter 63. This is here so you can come back to it later.

# Peek inside Ubuntu
$ docker run --rm -it ubuntu:22.04 bash
root@abc123:/# cat /etc/os-release | head -5
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu

root@abc123:/# apt --version
apt 2.4.11 (amd64)

root@abc123:/# exit
# Peek inside Fedora
$ docker run --rm -it fedora:39 bash
[root@def456 /]# cat /etc/os-release | head -5
NAME="Fedora Linux"
VERSION="39 (Container Image)"
ID=fedora
VERSION_ID=39
PRETTY_NAME="Fedora Linux 39 (Container Image)"

[root@def456 /]# dnf --version
4.18.0
...

[root@def456 /]# exit
# Peek inside Alpine (notice how tiny it is)
$ docker run --rm -it alpine:3.19 sh
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.19.0
PRETTY_NAME="Alpine Linux v3.19"

/ # apk --version
apk-tools 2.14.0

/ # exit
# Peek inside Arch
$ docker run --rm -it archlinux:latest bash
[root@ghi789 /]# cat /etc/os-release | head -3
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch

[root@ghi789 /]# pacman --version
 .---.                  Pacman v6.0.2
...

Same kernel underneath. Different userspace. Different tools. Same fundamental concepts.


Debug This

Your colleague says: "I'm setting up a new production server and I want to use Arch Linux because it has the latest packages."

What is wrong with this reasoning? What would you recommend instead, and why?

Click to see the analysis

The problem: Rolling-release distributions like Arch are risky for production servers because:

  1. Updates can introduce breaking changes at any time
  2. There is no guaranteed stable API -- a package update today might change a config file format
  3. There are no LTS commitments -- you cannot plan maintenance windows around known release dates
  4. Enterprise support contracts are not available
  5. The Arch philosophy explicitly says it is user-centric, not enterprise-centric

Better recommendation: Use Ubuntu LTS, Debian stable, RHEL, Rocky Linux, or AlmaLinux for production servers. These distributions freeze package versions and only backport security fixes, giving you a predictable, stable platform.

The nuance: Arch is an excellent learning tool and desktop distribution. The latest packages are great for a developer workstation. But "latest" and "stable" are often at odds for production.


Understanding Support Lifecycles

When choosing a distribution for production, the support lifecycle matters enormously.

Distribution Support Lifecycles (approximate):
─────────────────────────────────────────────────────────>
                                                    time

Ubuntu LTS:      ├──── 5 years standard ────┤
                 ├──── 10 years with ESM ────────────┤

Debian stable:   ├──── 3 years full ────┤
                 ├──── 5 years with LTS ──────┤

RHEL:            ├──── 10 years full support ────────────────┤
                 ├──── 13 years with ELS ────────────────────────┤

Fedora:          ├── ~13 months ──┤

Arch:            ├── rolling (forever, but no guarantees) ──────>

For a server that needs to run reliably for years, you want a distribution with a long support lifecycle. This ensures you receive security patches without needing to upgrade to a completely new release.

Think About It: Imagine you are managing 500 servers. What happens when your distribution reaches end-of-life? How does this affect your choice of distribution?


What Just Happened?

┌─────────────────────────────────────────────────────┐
│                                                      │
│  In this chapter, you learned:                       │
│                                                      │
│  - A distribution = kernel + package manager +       │
│    system tools + configuration + philosophy.         │
│                                                      │
│  - Major families: Debian (apt), Red Hat (dnf),      │
│    Arch (pacman), SUSE (zypper).                     │
│                                                      │
│  - Point-release distros (Debian, Ubuntu LTS, RHEL)  │
│    freeze versions for stability. Rolling-release     │
│    distros (Arch, Tumbleweed) update continuously.    │
│                                                      │
│  - For servers: Ubuntu LTS, Debian, RHEL, Rocky.     │
│    For desktops: Ubuntu, Fedora, Mint, Arch.          │
│    For containers: Alpine, Debian slim.               │
│    For learning: Ubuntu LTS or Fedora.                │
│                                                      │
│  - Package managers differ in syntax but share        │
│    the same concepts: install, remove, update,        │
│    search, query.                                     │
│                                                      │
│  - Support lifecycles matter for production.          │
│    RHEL: 10+ years. Ubuntu LTS: 5-10 years.          │
│    Arch: rolling with no guarantees.                  │
│                                                      │
└─────────────────────────────────────────────────────┘

Try This

Exercises

  1. Identification exercise: Run cat /etc/os-release on every Linux system you have access to (VM, server, WSL, Docker containers). Record the ID, ID_LIKE, and VERSION_ID for each.

  2. Comparison exercise: Visit the websites of Ubuntu (ubuntu.com), Fedora (fedoraproject.org), and Arch Linux (archlinux.org). For each, find: the latest release version, the supported architectures, and the default desktop environment.

  3. Package manager exercise: Using the comparison table in this chapter, write the equivalent commands for all three package managers to: (a) install the curl package, (b) search for packages related to "postgresql", and (c) remove the curl package.

  4. Research exercise: Go to distrowatch.com and look at the top 10 distributions by page hit ranking. How many of them are Debian-based? How many are independently developed?

  5. Decision exercise: For each scenario below, choose a distribution and justify your choice:

    • A web server that must run for 5 years with minimal maintenance
    • A developer's personal laptop
    • A Raspberry Pi running as a home media server
    • A Docker base image for a microservice
    • A security professional's testing workstation

Bonus Challenge

Install two different distributions in virtual machines (Chapter 3 shows you how) and perform the same task in both -- for example, install Nginx, start it, and verify it is running. Note every difference in commands and paths. This is the fastest way to internalize how distributions differ.


What's Next

You have chosen your distribution (or at least narrowed it down). Now it is time to actually install it. Chapter 3 walks you through multiple installation methods: virtual machines, WSL2 on Windows, bare metal, and cloud instances.