Package Managers: Brew, Yum, and Apt Get

This image has an empty alt attribute; its file name is Unix-Basics-fast-cover-1024x683.jpg


A package manager is a tool that you use to install Unix commands.

It is run on the command line, and typically, what it does is it will download and install packages of Unix commands (sometimes many at the time) so that you can use them locally.

Using package managers is a fundamental part of getting comfortable with UNIX-based systems.

Although there are more than these, we will cover these three options:

  1. Homebrew (macOS and Linux):
  2. Yum (Red Hat-based Linux distributions):
  3. Apt (Debian-based Linux distributions):

Remember that these commands typically require administrative privileges, so you might need to prepend (put before) the sudo command to them to execute them with the necessary permissions. Package managers also handle dependencies automatically, ensuring that required libraries and components are installed along with the desired package. Always refer to the official documentation of your chosen package manager and operating system for the most accurate and up-to-date information on using these tools.

For macOS, you will generally use Homebrew.

For Windows WSL, most of the packages you will need are available using Apt but some may require you to use Yum.

How do you install the package manager? Typically, they have a shell script or a downloadable that will install the package manager itself.