Red Hat Enterprise Linux Administration (RHEL 6 to 10)
Exit

Lesson 1 of 29 · User

The Red Hat family and its versions

25 min Rocky Linux 9 Versions 6, 7, 8, 9, 10

Objective

Learn to recognize a distribution from the Red Hat family, identify its exact version in a few seconds, and understand why this version changes the way you work.

Key points

  • RHEL (Red Hat Enterprise Linux) is Red Hat's commercial distribution. A major version comes out about every 3 years and is maintained for 10 years.
  • Fedora is the laboratory: new features appear there first. CentOS Stream is the step just before RHEL.
  • Rocky Linux and AlmaLinux are free, compatible rebuilds of RHEL. What you learn on one works on the others.
  • The major version (6, 7, 8, 9, 10) decides the tools: service or systemctl, yum or dnf, iptables or firewalld…
  • Reflex command on an unknown server: cat /etc/redhat-release.

Who is who in the family?

Picture a production line:

Fedora  ──►  CentOS Stream  ──►  RHEL  ──►  Rocky Linux / AlmaLinux
(new features)  (preparation)   (product)    (free rebuilds)
Distribution For whom? Price Note
Fedora Developer workstations, curious users Free New version about every 6 months, short lifetime (about 13 months)
CentOS Stream Developers who want to see the next RHEL Free Receives fixes before RHEL
RHEL Companies that want official support Paid subscription Certified by software vendors (Oracle, SAP…)
Rocky Linux Production servers with no license budget Free Created in 2021 by one of the founders of CentOS
AlmaLinux Same Free Created in 2021, backed by a foundation
CentOS Linux (6, 7, 8) Historical Free Finished: 7 ended on 30 June 2024, 8 ended at the end of 2021

Concrete example. An SME in Casablanca that runs the invoicing of 40 shops buys RHEL: if a serious failure occurs, it can call Red Hat support. A school in Rabat that hosts its learning website chooses Rocky Linux: same commands, no license to pay, but no commercial support.

Major and minor versions

A number such as 9.4 reads like this:

  • 9 = major version. You do not go from 8 to 9 with a simple update: it is a migration (reinstallation or the leapp tool).
  • 4 = minor version. It arrives through normal updates (dnf update), without breaking anything.
Version Release Kernel End of standard support Remember
RHEL 6 November 2010 2.6.32 November 2020 service, chkconfig, iptables, ext4
RHEL 7 June 2014 3.10 30 June 2024 systemd, firewalld, XFS by default
RHEL 8 May 2019 4.18 May 2029 dnf, BaseOS + AppStream repositories, modules
RHEL 9 May 2022 5.14 May 2032 Built from CentOS Stream 9, OpenSSL 3
RHEL 10 May 2025 6.12 2035 (planned) No more AppStream modules, modernized cryptography

After the end of standard support, Red Hat sells extended support (Extended Life Cycle Support). This is why you still find RHEL 6 and 7 servers in companies: migration is expensive, so it gets postponed.

Identify the system in 10 seconds

cat /etc/redhat-release
# Rocky Linux release 9.4 (Blue Onyx)
# Red Hat Enterprise Linux Server release 7.9 (Maipo)
# CentOS release 6.10 (Final)

cat /etc/os-release        # exists from RHEL 7 onwards (missing on RHEL 6)
# NAME="Rocky Linux"
# VERSION_ID="9.4"
# ID="rocky"
# ID_LIKE="rhel centos fedora"

rpm -E %rhel               # shows only the major version: 9
uname -r                   # the kernel: 5.14.0-427.el9.x86_64

The el9 suffix in the kernel name (or in the name of any package) means "Enterprise Linux 9". It gives you the version even when /etc/redhat-release has been modified.

rpm -q bash
# bash-5.1.8-9.el9.x86_64      ← el9: package built for the 9 family

Red Hat subscriptions

With RHEL, the system works without a subscription, but without a subscription you have no access to the official repositories, so no updates and no package installation.

subscription-manager register        # registers the machine with the Red Hat account
subscription-manager status          # subscription status
subscription-manager repos --list-enabled   # enabled repositories
  • Since 2022, accounts use Simple Content Access mode by default: registration is enough, you no longer need to "attach" a subscription to each machine.
  • Red Hat offers a free developer subscription for individuals (up to 16 machines), perfect for practicing for the RHCSA.
  • Rocky and AlmaLinux have no subscription-manager to configure: the repositories are open.

Recent history, in brief

  • 2014: Red Hat hires the CentOS team.
  • December 2020: Red Hat announces that CentOS 8 will end at the end of 2021, replaced by CentOS Stream.
  • 2021: Rocky Linux and AlmaLinux are born.
  • 2023: Red Hat now publishes its sources mainly through CentOS Stream. Rocky keeps aiming for a faithful copy; AlmaLinux aims for binary compatibility with RHEL rather than an identical copy.

By version

Topic RHEL 6 RHEL 7 RHEL 8 RHEL 9 RHEL 10
/etc/os-release file missing present present present present
Service management service, chkconfig systemctl systemctl systemctl systemctl
Packages yum yum dnf (and yum = alias) dnf dnf
Default file system ext4 XFS XFS XFS XFS
System Python 2.6 2.7 3.6 (platform-python) 3.9 3.12
Free clone CentOS 6 CentOS 7 CentOS 8 (ended), Rocky 8, Alma 8 Rocky 9, Alma 9 Rocky 10, Alma 10
Code name Santiago Maipo Ootpa Plow Coughlan

Common pitfalls

  • Confusing CentOS Stream and CentOS Linux. Stream is ahead of RHEL, not a stable copy: for a production server that must stay frozen, prefer Rocky or AlmaLinux.
  • Believing that a "RHEL" tutorial applies everywhere. A RHEL 6 tutorial tells you service httpd restart; on RHEL 9 the command still works (it redirects to systemctl), but chkconfig and iptables no longer behave the same way. Always check the version first.
  • Looking for /etc/os-release on RHEL 6: it does not exist. Use /etc/redhat-release.
  • Forgetting that an unregistered RHEL server receives no security updates.

Lab

Your lab runs a distribution from the Red Hat family. Without being told which one, you will:

  1. save its identity card (/etc/redhat-release);
  2. write its major version to a file;
  3. find out which package installs the file /etc/redhat-release — a first contact with rpm, which we will study in detail at level 2.

Quiz

  1. In what order do new features move between Fedora, CentOS Stream and RHEL?
  2. What does the el8 suffix mean in openssl-1.1.1k-12.el8_9.x86_64?
  3. Which command gives the version on an old CentOS 6 server, where /etc/os-release does not exist?
  4. An online shop wants a free server, stable for 10 years, compatible with RHEL 9. What do you recommend?
  5. What happens if a RHEL server is not registered with subscription-manager?
Answers
  1. Fedora first, then CentOS Stream, then RHEL (and then Rocky/AlmaLinux, which rebuild RHEL).
  2. The package is built for Enterprise Linux 8 (RHEL 8 and its clones).
  3. cat /etc/redhat-release (or rpm -q centos-release).
  4. Rocky Linux 9 or AlmaLinux 9 (not CentOS Stream, which moves ahead of RHEL).
  5. It works, but has no access to the Red Hat repositories: no security updates and no package installation.

Reference sources: official Red Hat Enterprise Linux documentation (CC BY-SA 3.0) and the "Red Hat Enterprise Linux Life Cycle" page. Original MasterLinux text.

Practical exercises

To do on Rocky Linux 9

The online terminal is coming soon. Meanwhile, do these tasks on your own Linux machine, a virtual machine or WSL.

  1. Save the content of /etc/redhat-release to /root/version.txt
    Show a hintcat reads a file, and the > sign sends the output to another file.
    Show the solution
    cat /etc/redhat-release > /root/version.txt

    Check : grep -qi 'release' /root/version.txt

  2. Write only the MAJOR version number of the system (a single number, for example 8) to /root/majeure.txt
    Show a hintLook at the VERSION_ID line of /etc/os-release, or run rpm -E %rhel. Then: echo <number> > /root/majeure.txt
    Show the solution
    . /etc/os-release && echo ${VERSION_ID%%.*} > /root/majeure.txt

    Check : . /etc/os-release && grep -qx "${VERSION_ID%%.*}" /root/majeure.txt

  3. Find which RPM package provides the file /etc/redhat-release and save the answer to /root/paquet.txt
    Show a hintrpm -qf <file> answers the question “which package does this file belong to?”
    Show the solution
    rpm -qf /etc/redhat-release > /root/paquet.txt

    Check : test -s /root/paquet.txt && grep -q 'release' /root/paquet.txt && rpm -q $(cat /root/paquet.txt) >/dev/null

Official references consulted: RHEL 6 — Release Notes et Technical Notes ; Red Hat Enterprise Linux Life Cycle (cycle de vie officiel). Original MasterLinux text.