Distributions & Package Formats
Two Package Worlds
On Windows or macOS, installing software usually means downloading an installer and clicking through a wizard. Linux does it differently: software is distributed as packages - pre-built bundles of a program's files, plus metadata about what other software it needs to run - and a package manager handles downloading, unpacking, and tracking them for you.
Scenario: You needcurlon a fresh server. You don't hunt down a website, download a binary, and hope it's compatible with your system. You run one command, the package manager fetchescurland anything it depends on from a trusted repository, and it's ready to use seconds later - with an entry recorded so it can be cleanly removed or upgraded later.
Nearly every distro descends from one of two packaging families, and exams (and real jobs) expect you to be comfortable in both:
| Family | Package | Low-level tool | High-level tool | Distros |
|---|---|---|---|---|
| Debian | .deb | dpkg | apt / apt-get | Debian, Ubuntu, Mint |
| Red Hat | .rpm | rpm | dnf (was yum) | RHEL, Fedora, Rocky, CentOS, SUSE (zypper) |
Notice each family actually has two tools, at two different levels, and the distinction matters:
- Low-level tools (
dpkg,rpm) operate on a single package file you already have on disk. They can install it, but they have no concept of a repository and will not fetch anything else for you. If that package needs another package that isn't installed, they simply fail. - High-level tools (
apt,dnf) know how to talk to repositories - servers hosting thousands of packages plus a map of what depends on what. They resolve dependencies automatically, downloading everything a package needs in the right order.
Analogy: The low-level tool is like being handed a single furniture box with assembly instructions that say "requires screws (not included)." The high-level tool is like ordering from a store that automatically adds the screws to your cart before checkout, because it already knows the full parts list.