Based on the Linux Master 2 exam syllabusReport an error
With only a kernel, you can't use a computer. To actually use one, you need all of this in addition.
| Family | Package format | Low-level tool | High-level tool | Representative distributions |
|---|---|---|---|---|
| Red Hat | .rpm | rpm | yum → dnf | RHEL, CentOS, Rocky, Alma, Fedora |
| Debian | .deb | dpkg | apt, apt-get | Debian, Ubuntu, Mint |
| SUSE | .rpm | rpm | zypper | SLES, openSUSE |
Trap: SUSE also uses RPM. If you memorize only "RPM = Red Hat," you'll be wrong. It's safer to tell them apart by the high-level tool —
dnfmeans Red Hat,zyppermeans SUSE.
The reason the tools are split into two columns in the table is dependencies. A single program usually needs several other libraries installed in order to run.
| Category | Low-level tools (rpm, dpkg) | High-level tools (dnf, apt, zypper) |
|---|---|---|
| What they handle | One package file you have in hand | Packages in an internet repository |
| Dependencies | Only tell you about them. You must fetch them yourself | Automatically find and install the needed packages together |
| When to use | Install from a downloaded file, query install info | Everyday install, removal, and updates |
Here is how you type the same job in each family, side by side (detailed options are covered in Week 7).
| Task | Red Hat family | Debian family | SUSE family |
|---|---|---|---|
| Install from a repository | dnf install package | apt install package | zypper install package |
| Remove | dnf remove package | apt remove package | zypper remove package |
| Install from a file | rpm -ivh file.rpm | dpkg -i file.deb | rpm -ivh file.rpm |
| List installed | rpm -qa | dpkg -l | rpm -qa |
yum and dnf: dnf is the successor to yum. From RHEL 8, dnf is the default, and the yum command remains for compatibility and links to dnf.apt and apt-get: apt came later and is polished to be friendlier for humans. They do the same job.⚠️ Trap: On the Debian family,
apt updateonly refreshes the repository lists. Actually upgrading packages isapt upgrade. On the Red Hat family,dnf updateactually upgrades packages. Even with the same name, they do different things.
Fedora ──────► RHEL ──────► CentOS Stream / Rocky / Alma
(testing ground) (commercial (free RHEL-compatible
stable) versions)
Latest tech Paid support Free rebuilds
Fast cycle Long-term supportThe diagram above simplifies the "direction stability flows," and the actual order in which code flows is a bit finer.
Fedora ──► CentOS Stream ──► RHEL ──► Rocky Linux · AlmaLinux
(experiment) (previews the next (commercial) (free versions rebuilt
RHEL version) to be compatible with RHEL)| When | Event |
|---|---|
| 2003 | The free 'Red Hat Linux' ended, and it split into Fedora for the community and RHEL for enterprises |
| Late 2020 | Red Hat announced it was changing CentOS's direction to CentOS Stream |
| 2021 | CentOS Linux 8 support ended (at year-end). The first releases of AlmaLinux and Rocky Linux appeared |
| June 2024 | CentOS Linux 7 support ended — the old-style CentOS was completely over |
Debian runs three branches at the same time.
| Branch | Character |
|---|---|
| stable | The official release. This is what you use on servers |
| testing | The candidate for the next stable |
unstable (nickname sid) | Where new packages first arrive |
Ubuntu's version number is the release year and month.
22.04 LTS 23.10 24.04 LTS
│ │ │ │ │ │
│ └ April │ └ October │ └ April
└─── 2022 └─── 2023 └─── 2024YaST.| Distribution | Feature |
|---|---|
| Slackware | One of the oldest distributions. Simple and close to Unix |
| Gentoo | Installs by compiling the source yourself. High freedom for optimization |
| Arch | Rolling release. Always stays up to date |
| Android | Based on the Linux kernel, but uses its own libraries instead of the GNU tools |
| Raspberry Pi OS | Debian-based. For small boards |
Past exams include questions asking for "an operating system based on the Linux kernel" with Android among the options. Android is a separate layer made by Google on top of the Linux kernel, so it shares only the kernel and its composition differs from ordinary distributions.
Most distributions were not built from the ground up but on top of an earlier distribution. Questions asking you to pick "the one with a different base" come from this family tree.
| Distribution | First released | Base | What to remember |
|---|---|---|---|
| Slackware | 1993 | (an early distribution called SLS) | Created by Patrick Volkerding. The oldest distribution still continuing today |
| Debian | 1993 | Independent | Started by Ian Murdock. The name combines his wife Debra and himself, Ian |
| SUSE | Early 1990s | Originally Slackware | Started in Germany |
| Ubuntu | 2004 | Debian | Sponsored by Canonical |
| Linux Mint | — | Ubuntu | The chain runs Debian → Ubuntu → Mint |
| Kali Linux | — | Debian | A distribution that collects security-audit and penetration-testing tools |
Distributions outside Red Hat, Debian, and SUSE each have their own package tools too.
| Distribution | Package tool | Feature |
|---|---|---|
| Arch | pacman | Receives pre-built packages on a rolling release |
| Gentoo | emerge (Portage) | Downloads the source and compiles it on your own computer |
| Slackware | pkgtool | Packages in compressed-archive form (.tgz, .txz). Doesn't resolve dependencies automatically |
uname only tells you about the kernel. The distribution is told by files under /etc.
$ cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
$ cat /etc/redhat-release
Rocky Linux release 9.3 (Blue Onyx)| File / command | Where it exists | Contents |
|---|---|---|
/etc/os-release | Common to modern distributions | Name, version, family (ID_LIKE) |
/etc/redhat-release | Red Hat family | A one-line distribution name and version |
/etc/debian_version | Debian family | The Debian version |
lsb_release -a | When that package is installed | Distributor ID, description, release, codename |
ID_LIKE line tells you the family. Rocky shows rhel centos fedora, and Ubuntu shows debian. When you meet an unfamiliar distribution, look at this line first.cat /etc/*-release, whatever distribution it is, all the matching files come out at once.zypper or YaST, it's SUSE.| Model | Description | Examples |
|---|---|---|
| Fixed release | Issues versions on a set cycle | Debian, Ubuntu, RHEL |
| Rolling release | Updates continuously with no version divisions | Arch, Gentoo |
| LTS | Supports a particular version for a long time | Ubuntu LTS (5 years), RHEL (10 years) |
That's all for this week. Tomorrow we tie together the concepts covered in Week 1 on a single page.
dnf, apt, zypper, etc.Click a choice to reveal the answer and explanation.
Question 1
Which of the following is the package format used by Debian-family distributions?
Question 2
Which of the following pairings of a distribution and its high-level package management tool is NOT correct?
Question 3
Which of the following is a distribution whose role is to test technologies to be introduced into RHEL first?
Question 4
Which of the following is LEAST related to the components of a Linux distribution?
Question 5
Which of the following is an operating system that is based on the Linux kernel but uses its own libraries and runtime environment instead of the GNU tools?