How to Install Homebrew Package Manager on macOS

A definitve guide to install homebrew package manager on macOS

If you’re a macOS user and want a convenient way to manage and install software, Homebrew is the go-to package manager. It simplifies installing, updating, and removing apps and command-line tools.

In this guide, I’ll walk you through the steps to install Homebrew and show you how to use it to install software.

Open Terminal

First, we need to access the Terminal, the command-line interface for macOS. Here’s how to do it:

  1. Go to your Applications folder.
  2. Open the Utilities subfolder.
  3. Click on Terminal to launch it.

Alternatively, you can use Spotlight by pressing Cmd + Space and typing “Terminal.”

Install Xcode Command Line Tools

Before we can install Homebrew, we need to install the Xcode Command Line Tools. These tools are essential for Homebrew to work properly. To install them, follow these steps:

In the Terminal, type the following command:

xcode-select --install

After you press Enter, a pop-up window will appear asking if you want to install the Command Line Tools. Click Install and follow the on-screen instructions.

This process may take a few minutes, depending on your internet connection.

Install Homebrew

Once the Xcode Command Line Tools are installed, you’re ready to install Homebrew.

In the Terminal, type the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Press Enter, and Homebrew’s installation script will start running. Follow the prompts, and Homebrew will install on your Mac. You may be asked to enter your Mac password to allow changes.

Once installed, you can confirm it’s working by typing:

brew doctor

If everything is set up correctly, you should see a message:

Your system is ready to brew.

Let’s try Installing a Command Line Tool

Now that Homebrew is installed, let’s use it to install a command-line tool. As an example, we’ll install wget, a popular utility for downloading files from the internet.

In the Terminal, type:

brew install wget

Homebrew will download and install wget. Once it’s done, you can use wget from the command line.

Let’s try Installing a macOS Application (Cask)

Homebrew can also be used to install macOS applications outside App Store with a feature called Casks. Let’s install Google Chrome as an example.

In the Terminal, type:

brew install --cask google-chrome

Homebrew will handle the download and installation. Once complete, you’ll find Google Chrome in your Applications folder, ready to use!

Video Tutorial

I also made a video tutorial covering the steps of this article.

Conclusion

And that’s it! You’ve successfully installed Homebrew and learned how to use it to install both command-line tools and macOS applications. Homebrew is an incredibly useful tool that can help streamline software management on your Mac.

If you run into any issues or need help with specific installations, feel free to leave a comment below. And if this guide was helpful, don’t forget to share it with others!

Thanks for reading and see you around!

References

  • Homebrew Official Website: brew.sh