Software comes in packages
You don't install Linux software by downloading programs one at a time. Instead, a package manager installs it from a repository: a big, trusted collection of ready-made packages. A package holds a program, its data and documentation, and a list of the other packages it needs to work (its dependencies).
Think of it like this: A package manager is an app store run from the command line. You ask for a program by name and it fetches that program, plus anything else it needs, and keeps track of everything it put where.
Why not just download programs?
Because the package manager does what hand-downloading can't:
| It handles | Meaning |
|---|---|
| Dependencies | Pulls in the other libraries a program needs, automatically |
| Updates | Upgrades everything you've installed with one command |
| Removal | Takes a program out cleanly, with nothing left behind |
| Trust | Checks each package's signature, so you know it hasn't been tampered with |
Different families, same idea
Each Linux family has its own package manager and package format, but they all work the same way:
| Family | Manager | Package |
|---|---|---|
| Debian, Ubuntu | apt | .deb |
| Fedora, Red Hat | dnf | .rpm |
| Alpine (this machine) | apk | .apk |
| Arch | pacman | .pkg.tar.zst |
This machine is Alpine Linux, so you'll use apk. Once you know the idea, switching to apt on an Ubuntu server is just different words for the same steps. apk --version confirms which one is here:
apk --version
head -n 2 /etc/os-releaseIn the terminal
student@vulntech:~$ apk --version apk-tools 2.14.6, compiled for x86. student@vulntech:~$ head -n 2 /etc/os-release NAME="Alpine Linux" ID=alpine
Tip: The commands differ but map neatly. Install is
apk add,apt installordnf install; remove isapk del,apt removeordnf remove. Learn the pattern, not just one tool.
Remember: A package manager installs software from a repository and handles dependencies, updates and removal. Alpine uses
apk; Ubuntu usesapt; the ideas are the same.