Sub topic 11
Criteria that matter when choosing
This chapter assumes you can administer a Linux server from the shell and use systemd. It also assumes you have installed packages with a package manager and know what a firewall and a file permission model do. Earlier chapters covered the Debian and RHEL lineages, release models, package tools, repositories, mandatory access control, and firewalls. Here you turn those differences into a way to decide.
Why criteria beat preference
Ubuntu Server, Debian, and Rocky Linux can all run nginx, PostgreSQL, containers, and a monitoring agent. A choice made on "I like apt" or "everyone uses Ubuntu" tends to fail later, when the support window ends or a vendor refuses a ticket. A better approach is to list the constraints that apply to your situation, rank them, and let them eliminate options.
Most constraints fall into seven groups:
- Support horizon and upgrade cadence
- Software availability and vendor support
- Team skills
- Security model and defaults
- Compliance and certification
- Platform and cloud fit
- Cost and operational overhead
Criterion 1: support horizon and upgrade cadence
Support length decides how often you must do a major upgrade. A major upgrade is the riskiest routine task a server has.
| Distribution | Major release rhythm | Standard security support | Extended options |
|---|---|---|---|
| Ubuntu Server LTS | Every two years, in April | 5 years for packages in the main repository | Up to 10 years with Ubuntu Pro, longer with a paid add-on |
| Debian stable | About every two years | About 3 years from the Debian security team, then Debian LTS | About 5 years in total, with LTS run by a separate team of paid contributors |
| Rocky Linux | A major release every few years, with minor releases about every six months | Up to 10 years per major release, following RHEL | None needed, because the window is already long |
Check exact dates against each project's current lifecycle page before you commit. Dates for individual releases change as new ones ship.
Three points matter in practice:
- Ubuntu's 5-year standard window covers the main repository. Packages in universe get security fixes only through Ubuntu Pro or on a best-effort basis from the community. Many real applications depend on universe packages.
- Debian's LTS phase covers a reduced set of packages and architectures. It is a good safety net, but you should plan to upgrade within the regular window if you can.
- Rocky tracks RHEL, so a minor release changes the base system under you. You apply minor releases with
dnf update, and they are meant to stay compatible within the major version.
If your server must run unchanged for many years with little attention (an appliance-like internal service, or a system that is expensive to re-certify), the 10-year Rocky window or Ubuntu Pro fits. If you rebuild servers from automation every year, the long window matters much less.
Criterion 2: software availability and vendor support
Ask what the software you must run officially supports. Vendors rarely support everything. A database vendor, a backup agent, or a commercial monitoring product usually lists supported distributions and versions in its documentation.
Check these in order:
- Vendor support matrix. If a vendor lists "RHEL 9 and compatible" or "Ubuntu 24.04 LTS" but not Debian, that decides the question for production use. Rocky Linux is usually accepted as RHEL-compatible by customers, but a vendor may not give it formal support.
- Version of the runtime in the base repositories. Compare the PHP, Python, or PostgreSQL version your application needs with what each distribution ships. Debian stable and RHEL-family systems favor older, stable versions. Rocky offers newer versions through module streams or AppStream for some languages and databases.
- Third-party repositories. Vendors such as PostgreSQL, Docker, and nginx publish their own apt and dnf repositories. These work on all three systems, but you take on the job of tracking them.
- EPEL on Rocky. The base repositories carry fewer packages than Debian or Ubuntu. EPEL fills many gaps, and it is community-maintained with no commercial support promise.
A quick way to compare is to check the version each system offers for a package you depend on:
# Debian / Ubuntu
apt policy postgresql
# Rocky Linux
dnf info postgresql-server
dnf module list postgresqlDo this on each candidate before you decide. Do not rely on memory of what a version "usually" is.
Criterion 3: team skills
The best technical fit can still be a poor choice if nobody on the team can debug it at 3 a.m. Consider:
- Which package tools and firewall front ends the team already knows (
aptandufwagainstdnfandfirewalld). - Whether anyone has real SELinux experience. SELinux is enforcing by default on Rocky, and a team that responds to every denial by disabling it loses one of the system's main benefits.
- How many servers already run each distribution. Mixing families across a small fleet doubles the number of things to learn, patch, and document.
Consistency within a fleet is usually worth more than the small advantage of one distribution on one workload.
Criterion 4: security model and defaults
The three systems differ here in defaults, not in capability.
| Area | Ubuntu Server | Debian | Rocky Linux |
|---|---|---|---|
| Mandatory access control | AppArmor, enabled by default | AppArmor, available and enabled in recent releases | SELinux, enforcing by default |
| Firewall front end | `ufw`, installed but not enabled | None enabled by default | `firewalld`, enabled by default |
| Default policy style | Profiles per program | Profiles per program | Labels on every file and process |
AppArmor confines programs by path-based profiles. It is simpler to read and write, and it confines fewer things by default. SELinux labels every file, process, and port, and it can express finer rules. The cost is a steeper learning curve and more denials to understand.
Check which one is active on any host before you trust its defaults:
#!/usr/bin/env bash
# Report distribution, access control, and firewall tooling on this host.
. /etc/os-release
echo "OS: ${PRETTY_NAME} (ID=${ID}, ID_LIKE=${ID_LIKE:-none})"
if command -v getenforce >/dev/null 2>&1; then
echo "SELinux: $(getenforce)"
else
echo "SELinux: not installed"
fi
if [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ]; then
echo "AppArmor: enabled"
else
echo "AppArmor: not enabled"
fi
for tool in ufw firewall-cmd nft; do
if command -v "$tool" >/dev/null 2>&1; then
echo "Firewall tool present: $tool"
fi
doneRun it on a test machine for each candidate. A machine that surprises you in this output is a machine that surprises you in production.
Criterion 5: compliance and certification
Some environments require specific certifications: FIPS 140 cryptographic modules, CIS or DISA STIG hardening benchmarks, or Common Criteria evaluation. Check what your auditor accepts.
- RHEL has an extensive history of certifications. Rocky Linux is a rebuild and does not carry its own certifications. Auditors may accept it by compatibility or may demand RHEL itself.
- Ubuntu Pro adds FIPS-certified components and hardening tooling as part of the subscription.
- Debian offers hardening guidance but has no commercial certification program. It is a poor fit where an auditor demands a vendor-backed certificate.
Ask the compliance owner early. A certification requirement can remove an option before any technical comparison starts.
Criterion 6: platform and cloud fit
Cloud providers publish official images of all three. Check these points:
- Whether the provider has tuned images for its platform (kernel, drivers, agents) and who maintains them. Ubuntu images are widely available and often get the earliest tuned variants.
- Whether the provider's managed services (Kubernetes nodes, container hosts) list your distribution as supported.
- How the image is updated. Cloud-init is present in all three families' cloud images, so provisioning code usually transfers between them, but package names and defaults inside your scripts will not.
For bare metal, check hardware support. A newer Ubuntu kernel or HWE stack may support recent hardware sooner than Debian stable or Rocky.
Criterion 7: cost and operational overhead
Ubuntu, Debian, and Rocky are all free to download and run. Costs come from elsewhere:
- Paid support: Ubuntu Pro, or third-party Rocky support from partners. Debian has no vendor behind it.
- Staff time for upgrades. A 5-year window means a major upgrade about every 4 years. A 10-year window can halve that.
- Custom automation that must be kept compatible with one or more families.
Weighing the criteria
Not every criterion deserves equal weight. Separate hard constraints from preferences:
- Hard constraints remove options: a vendor that supports only one family, a mandated certification, a required support length.
- Preferences rank what remains: team familiarity, package freshness, how a default firewall feels.
Apply the hard constraints first. Only then use preferences to choose among the survivors.
A scoring worksheet
When the answer is still unclear, score each candidate against weighted criteria. The numbers force you to state what matters. They do not replace judgment.
# Weighted comparison. Edit the weights and scores for your own case.
weights = {
"support_horizon": 5,
"vendor_support": 4,
"team_skills": 4,
"security_defaults": 3,
"cloud_fit": 2,
}
# Scores from 1 (poor) to 5 (strong), filled in after checking each candidate.
scores = {
"Ubuntu Server LTS": {"support_horizon": 4, "vendor_support": 5, "team_skills": 4, "security_defaults": 4, "cloud_fit": 5},
"Debian stable": {"support_horizon": 3, "vendor_support": 3, "team_skills": 4, "security_defaults": 4, "cloud_fit": 4},
"Rocky Linux": {"support_horizon": 5, "vendor_support": 4, "team_skills": 2, "security_defaults": 5, "cloud_fit": 4},
}
totals = {
name: sum(weights[c] * s for c, s in crit.items())
for name, crit in scores.items()
}
for name, total in sorted(totals.items(), key=lambda item: item[1], reverse=True):
print(f"{name}: {total}")The scores in this example are illustrative. Replace them with findings from your own checks, such as the vendor matrix and the lifecycle pages. Then change a weight and see whether the ranking flips. If a small change in one weight reverses the result, the options are close, and the tie-breaker should be the criterion you can least afford to get wrong.
Common mistakes
- Choosing by the version number of one package. You can usually install a newer version from a vendor repository, a module stream, or a container. Do not pick a base system for that alone.
- Ignoring the end-of-support date. A server deployed in the last year of a release's window gives you little time before a forced upgrade.
- Assuming Rocky equals RHEL for every purpose. It is binary-compatible in practice, but it has no vendor support contract and its own certifications are absent.
- Mixing families without a reason. A few Debian machines in a Rocky fleet need separate patching procedures, separate firewall rules, and separate runbooks.
- Treating defaults as policy. A default tells you what the distribution ships. Your security policy should state what you require, then you verify it on each host.
Exercises
Exercise
A commercial backup agent's documentation lists supported systems as "RHEL 9 and Ubuntu 22.04 LTS or 24.04 LTS". Your team prefers Debian. Which kind of criterion is the vendor matrix, and how should it affect your choice?
Show answer
It is a hard constraint, because it removes an option before preferences are considered. Debian is not listed, so you should choose Ubuntu LTS or a RHEL-compatible system such as Rocky Linux. You can ask the vendor whether Rocky counts as supported, because the list names RHEL itself. Team preference for Debian only matters among the options that remain.
Exercise
A server must run for roughly eight years with minimal major upgrades, and the budget has no line for paid support. Which candidate fits best, and why?
Show answer
Rocky Linux. A major release gets security updates for up to 10 years without a subscription. Ubuntu LTS reaches 10 years only with Ubuntu Pro, which costs money, and its free window is 5 years for the main repository. Debian stable gets about 5 years in total including LTS.
Exercise
You run the host-check script on a new server and it prints "SELinux: Enforcing". An application fails to bind to a nonstandard port. What should you do, and what should you avoid?
Show answer
Look for the denial in the audit log or journal, then allow the port with the SELinux policy tools, for example by labeling the port for the application's type, and keep SELinux enforcing. Avoid running setenforce 0 or disabling SELinux permanently, because that removes the protection and hides the real problem.