Package Management
In the early days of Windows, if you wanted to install software, you went to a website, downloaded a .exe or .msi file, ran it, and clicked “Next, Next, Agree, Finish.”
In the Unix world, this was considered archaic. Instead, Unix used Package Managers.
Today, every major OS has adopted the package manager model for developers and power users.
What is a Package?
A package is a compressed archive containing:
- The Code/Binaries (the actual program).
- Metadata (description, version, author).
- Dependencies (a list of other programs this one needs to run).
The Repository Model
Instead of searching the whole internet, your OS looks at a Repository—a secure, curated “library” of software maintained by the OS developers.
Linux: The Masters of Metadata
In Linux, you almost never download software from a website.
- Debian/Ubuntu (
apt):sudo apt update && sudo apt install vlc - RHEL/Fedora (
dnf):sudo dnf install git - Arch (
pacman):sudo pacman -S nodejs
Dependency Hell
The genius of these managers is that they solve “Dependency Hell.” If you install a video editor that requires a specific graphics library, the package manager will say: “I see you need Library X. I will download that for you first.” It builds a Dependency Graph and installs everything in the correct order.
macOS: The Hybrid Approach
Apple provides the “App Store” for consumers, but it is too restrictive for developers. The community created Homebrew (“The missing package manager for macOS”).
brew install python- It installs software into its own folder and subverts the need for constant “Installer Wizard” dialogs.
Windows: The Late Bloomer
For a long time, Windows lacked a built-in package manager. The community filled the gap with:
- Chocolatey: The first major manager for Windows. Acts like
aptfor Windows. - Scoop: A lighter-weight manager designed specifically for developer tools (like Git and compilers).
Recently, Microsoft released winget (Windows Package Manager). It is now built into Windows 10 and 11.
winget install "Visual Studio Code"
”Self-Contained” Packages
A new trend in OS design is moving away from shared dependencies (which can break if one library updates) toward “Self-Contained” formats.
- Snap and Flatpak (Linux): These include every single library an app needs inside a single “container.” They are larger in size but much more reliable across different Linux distributions.
- Docker: As we’ll see in the next module, Docker takes this to the extreme by packaging the entire user-space of an OS into a single image.
Security and Trust
The most important feature of a package manager is Trust.
When you run apt install, your OS verifies the GPG Signature of the package. This proves that the code came from the official Ubuntu developers and hasn’t been tampered with by a hacker. This is why Linux is generally considered much more secure than “downloading random .exe files from the web.”
In the next module, we will explore the “meta” level of operating systems: Virtualization and Containers, and how we can run an OS inside another OS.