Packages and Package Managers

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 handlesMeaning
DependenciesPulls in the other libraries a program needs, automatically
UpdatesUpgrades everything you've installed with one command
RemovalTakes a program out cleanly, with nothing left behind
TrustChecks 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:

FamilyManagerPackage
Debian, Ubuntuapt.deb
Fedora, Red Hatdnf.rpm
Alpine (this machine)apk.apk
Archpacman.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-release

In 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 install or dnf install; remove is apk del, apt remove or dnf 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 uses apt; the ideas are the same.

HOME LEARN COMMUNITY DASHBOARD
Practice terminal Starting…