Linux Distributions — Ubuntu and Debian
You are given SSH access to web1 and asked to install a web server on it. Before typing a single install command you need to know one thing: which kind of Linux is this? The answer decides every package command you type for the rest of the day.
The rule
Same kernel, different families; the package manager tells you which.
Linux is strictly just the kernel: the core that talks to hardware, runs processes and manages memory. A distribution (distro) wraps that kernel with everything else: a package manager, an init system, default configuration, a release schedule and a support promise.
Distros group into families that share a package format and tools. The Debian family is the one you will meet most on cloud servers:
- Debian: community-run, conservative, famously stable.
- Ubuntu: built on Debian by Canonical, with a predictable schedule. Its LTS (long-term support) releases come every two years and get years of security updates, which is why servers run them.
Both use .deb packages and the apt tool:
sudo apt update # refresh the list of available packages
sudo apt install nginx # install a package and its dependencies
sudo apt upgrade # install newer versions of what you already have
apt list --installed | grep nginxapt update downloads nothing but the catalogue. Forgetting it is why an install sometimes fails with "unable to locate package" on a fresh server.