// 03 — survival kit
PACKAGE
MANAGER
Think of it like npm or pip — but for your entire operating system. One command to install, update, or remove any software. No installer wizards, no dragging to Applications, no .exe files.
WHAT IS A PACKAGE MANAGER?
A package manager is a tool that handles software for you. You tell it what you want, it downloads it from a trusted source, installs it, and handles all the dependencies automatically.
The package manager you use depends on which Linux distribution you have:
| Distro | Package Manager | Command |
|---|---|---|
| Ubuntu / Debian / Mint | APT | apt |
| Fedora / RHEL / CentOS | DNF | dnf |
| Arch / Manjaro | Pacman | pacman |
| Any distro | Snap | snap |
cat /etc/os-release and look for the NAME line. Most beginners are on Ubuntu — if so, use apt.
APT — FOR UBUNTU & DEBIAN
apt is the most common package manager you'll encounter. It pulls software from online repositories (think: official app stores for Linux).
Downloads the latest list of available packages. It doesn't actually update anything yet — it just syncs the index. Always run this before installing something.
Downloads and installs a package. You can install multiple packages in one command. Always needs sudo.
Removes a package. Use apt purge instead if you also want to wipe its config files.
Updates all installed packages to their latest versions. Run apt update first to refresh the index, then apt upgrade to apply the updates.
Searches available packages by name or description. Useful when you're not sure of the exact package name.
sudo apt update, then sudo apt install curl. Then verify it worked with curl --version. That's the full cycle.
DNF — FOR FEDORA & RHEL
If you're on Fedora, RHEL, or CentOS, you use dnf. The idea is exactly the same as apt — the commands just look slightly different.
SNAP — WORKS ON ANY DISTRO
Snap is a package format made by Canonical (the company behind Ubuntu). Snap packages are self-contained — they bundle all their dependencies, so they work on almost any Linux distro.
You'll mostly reach for snap when something isn't available in apt, or when you want the latest version of an app.
--classic flag removes some sandboxing restrictions. Some apps (like VS Code) need it to work properly. You'll know when you need it — snap will tell you.
APT vs DNF vs SNAP
Quick guide for when to use what:
| Situation | Use |
|---|---|
| You're on Ubuntu / Debian | apt — always try this first |
| You're on Fedora / RHEL | dnf — always try this first |
| Package not in apt/dnf | snap — good fallback |
| Want latest version of a GUI app | snap — often more up-to-date |
| Setting up a server | Stick to apt or dnf — snap isn't ideal for servers |
sudo apt update && sudo apt install <thing>. You'll only reach for snap when apt doesn't have what you need.
QUICK REFERENCE
WHAT NOW?
You've got the survival kit. Navigation, filesystem & permissions, package manager — that's genuinely all you need to function in Linux as a developer.
From here, learn as you go. Need to set up a database? Search "install postgresql ubuntu", grab the command, understand what it does, run it. With repetition, the commands you use often will stick on their own.
git with your package manager (if you don't have it already). Then run git --version to confirm. That's a real workflow, not a tutorial exercise.