
- checks the package metadata,
- identifies any missing dependencies,
- downloads the required components,
- and then installs and integrates the software with the system services.

Below we cover the most common package managers and the commands you’ll use to install software such as NGINX.

aptis the default package tool on Debian-based distributions and works with.debpackages.- Typical workflow: refresh the package index, install the package, then start or enable the service as needed.

yumhas been the traditional package manager on many Red Hat–based systems; newer systems favordnf, which provides a similar interface.- Both work with
.rpmpackages and handle dependency resolution for you.

- Homebrew installs packages into directories it manages (typically
/usr/localon Intel Macs or/opt/homebrewon Apple Silicon). - It generally does not require
sudofor day-to-day usage on macOS.
- Chocolatey provides command-line package management for Windows and is useful for automating installs across machines.
- Typical commands are executed in an elevated PowerShell.
Use the
-y flag with install, upgrade, or remove commands to automatically confirm prompts when you need non-interactive behavior (for scripting or automation). Note: apt update does not prompt and does not accept -y—use -y with apt install or apt upgrade if you want to skip confirmation.- Dependency resolution: The package manager fetches and installs required libraries and runtime components.
- Security and updates: Packages often include security updates and are tracked by your package system.
- Integration: Services installed via the package manager typically include systemd unit files or init scripts for easy management.
- Reproducibility: Scripts or automation tools that use package managers produce consistent results across systems.
- On Debian/Ubuntu:
- On Red Hat/CentOS/Fedora (using yum or dnf):
- On macOS (Homebrew):
- On Windows (Chocolatey):
- systemd (most Linux distros):
- macOS (Homebrew): follow Homebrew’s caveats output after
brew install nginx(it shows how to start the service). - Windows (Chocolatey): use the Service Manager or the provided startup instructions.
- NGINX Open Source Community
- apt documentation: https://manpages.debian.org/ and https://wiki.debian.org/apt
- dnf documentation: https://dnf.readthedocs.io/
- Homebrew: https://brew.sh/
- Chocolatey: https://chocolatey.org/