While Apple does include the App Store in modern macOS, the operating system still lacks a proper package manager. Homebrew fills that gap and makes installing and updating applications and utilities a breeze.

With macOS being the operating system of choice for many software developers around the world, it is to be expected that somebody else would step in to fill the gap in macOS and create a package manager for it. Development of Homebrew started in 2009 and has since then become the most popular package manager for macOS and one of the most popular projects on GitHub.

Installing Homebrew is an easy process that requires just two steps.

Installing necessary developer tools

There is only one prerequisite to installing Homebrew – command line development tools provided by Apple. If you have Xcode installed, then you already have these tools on your computer, but if you do not, you can obtain them either by installing Xcode from the Mac App Store, which you can find at the link below:

Or by installing just the developer tools, which you can do by attempting to run any of these development tools, such as gcc or xcode-select in the Terminal.

Install command line utilities prompt

When you type a command such as xcode-select in the Terminal, you will be presented with a window stating that the command you just tried to run requires command line developer tools. Just press the Install button, and follow the instructions to get the tools.

Now that you have the developer tools, you are ready to install Homebrew.

Installing Homebrew

Once you have the necessary tools, installing Homebrew is a one-step process. Run this command in the Terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This command will download the Homebrew installer script using curl, then run it with the Ruby programming language interpreter provided by Apple. The installer script will walk you through the installation process, and allow you to abort it if necessary.

When the script finishes, you'll be all set!

Optional: Enable Homebrew Cask

Homebrew, like any good package manager, is extensible and allows you to use ("tap") third-party repositories. One of the most popular ones is Homebrew Cask, which allows you to install many useful GUI applications, such as KeepingYouAwake.

To enable Homebrew Cask, run this command in the Terminal:

brew tap caskroom/cask

What do you think? Are you just now installing Homebrew, or were you using it before? Or are you perhaps more of a MacPorts type of person? Let us know in the comments below!