L2. Choosing a Distribution: Ubuntu, RHEL, Kali and Beyond
Video generating
Check back soon for the video lesson on Choosing a Distribution: Ubuntu, RHEL, Kali and Beyond
Hundreds of Linux distributions exist, but only a handful matter for security work. This lesson explains what a distribution is, compares the major families, and helps you choose the right one for servers, enterprise environments, penetration testing, and containers.
What Is a Linux Distribution?
The Linux kernel alone cannot do much for an end user. You need a shell, a package manager, system utilities, configuration tools, and optionally a desktop environment. A distribution (or "distro") bundles all of these components together into a coherent, installable operating system.
Each distribution makes its own choices about:
- Which package manager to use (apt, dnf, pacman, apk)
- Which init system manages services (systemd, OpenRC)
- How long releases receive security updates
- What default configuration ships out of the box
- Whether the distro targets servers, desktops, security professionals, or embedded devices
These choices have direct security implications. A distribution with short support cycles means you must upgrade more frequently or risk running unpatched software. A distro that ships with permissive defaults requires more hardening before production use.
The Major Distribution Families
Most distributions descend from one of three families. Understanding the family tells you which package manager to expect and where to find documentation.
Debian Family
| Distribution | Package Manager | Use Case |
|---|---|---|
| Debian | apt / dpkg | Stable servers, minimal installations |
| Ubuntu Server | apt / dpkg | General-purpose servers, cloud VMs |
| Ubuntu Desktop | apt / dpkg | Developer workstations, learning |
| Kali Linux | apt / dpkg | Penetration testing, security research |
Red Hat Family
| Distribution | Package Manager | Use Case |
|---|---|---|
| Red Hat Enterprise Linux (RHEL) | dnf / rpm | Enterprise production servers |
| CentOS Stream | dnf / rpm | RHEL preview, community development |
| Rocky Linux | dnf / rpm | Free RHEL-compatible server OS |
| AlmaLinux | dnf / rpm | Free RHEL-compatible server OS |
| Fedora | dnf / rpm | Cutting-edge workstations, developer testing |
dnf, rpm, and systemctl.
Rocky Linux and AlmaLinux emerged as free, community-driven replacements after CentOS shifted to CentOS Stream. They aim for binary compatibility with RHEL, making them popular for organizations that want RHEL-like stability without the subscription cost.
Other Notable Distributions
| Distribution | Package Manager | Use Case |
|---|---|---|
| Alpine Linux | apk | Containers, minimal footprint |
| Arch Linux | pacman | Rolling release, advanced users |
| openSUSE | zypper / rpm | Enterprise alternative to RHEL |
Choosing the Right Distribution
For Learning and Labs
Start with Ubuntu Server (LTS version). It has the largest community, the most tutorials, and the broadest cloud support. When you are comfortable, try an RHEL-family distro like Rocky Linux so you understand both apt and dnf.
For Enterprise Servers
Your employer will likely standardize on either Ubuntu LTS or RHEL (or a compatible derivative). Follow the organizational standard. Mixing distributions in production creates maintenance overhead and inconsistent security baselines.
For Penetration Testing
Use Kali Linux in a virtual machine or as a live boot. Do not install it as your primary operating system. Kali's pre-installed tools and root-first approach are designed for controlled assessments, not general computing.
For Containers
Use Alpine Linux or distroless images for production containers. Smaller images mean fewer packages, fewer potential vulnerabilities, and faster scanning with tools like Trivy.
Security Implications of Your Choice
Support Lifecycle
Every distribution has a defined support window during which security patches are released. Running an end-of-life (EOL) distribution means no more patches, which is one of the most common audit findings in enterprise environments.
Ubuntu 24.04 LTS Supported until April 2029 (standard), 2034 (ESM)
RHEL 9 Full support until May 2027, maintenance until May 2032
Alpine 3.20 Supported until May 2026Always check the EOL date before deploying a distribution in production.
Default Configuration
Some distributions ship with stricter defaults than others. For example, Ubuntu enables ufw (Uncomplicated Firewall) by default on desktop installations but not on server installations. RHEL enables SELinux in enforcing mode by default. These defaults shape your security posture from the moment of installation.
Package Freshness vs. Stability
Rolling-release distributions (Arch, Fedora) get the newest software quickly but may introduce breaking changes. LTS distributions (Ubuntu LTS, RHEL) prioritize stability and backport security fixes without upgrading to new major versions. For production security workloads, LTS releases are almost always the right choice.
Setting Up Your Lab Environment
For this course, you should have access to a Linux terminal. The easiest options:
- Cloud VM: Launch a free-tier Ubuntu Server instance on AWS, Azure, or GCP
- Virtual Machine: Use VirtualBox or VMware to run Ubuntu Server locally
- WSL 2: If you are on Windows, install Ubuntu via Windows Subsystem for Linux
- macOS Terminal: macOS is UNIX-based and shares many commands, but some Linux-specific features (systemd, apt) will not be available
Whichever method you choose, make sure you have a working terminal where you can practice the commands in the upcoming lessons.
- ✓A distribution bundles the Linux kernel with a package manager, init system, utilities, and default configuration choices.
- ✓Ubuntu LTS and RHEL are the two dominant families in enterprise and cloud environments.
- ✓Kali Linux is for penetration testing only and should not be used as a daily or production OS.
- ✓Alpine Linux minimizes the attack surface for containers with its small image size and reduced package count.
- ✓Always verify a distribution's end-of-life date before deploying to production.
1. What is the primary security advantage of using Alpine Linux as a container base image?
2. Why is Kali Linux not recommended as a daily-use operating system?
3. An enterprise server is running a Linux distribution that reached end-of-life six months ago. What is the primary risk?