Homebrew is a widely-used package manager for macOS, providing an easy way to install and manage software on Apple computers. It supplements the software available in the App Store by offering a vast array of open-source software, tools, and utilities.

Historically, developers and power users on macOS might have felt a certain limitation due to the lack of a built-in package manager, similar to what's available in many Linux distributions. Homebrew fills this gap by offering a streamlined way to install, update, and manage software packages, from simple tools to complex applications.

To set up Homebrew on your macOS system, you'll need to use the terminal. The installation is straightforward, and once completed, you'll have access to thousands of packages and utilities, ready to be installed with a single command.

Steps to install Homebrew on macOS:

  1. Launch the Terminal application. This can be found in the Applications > Utilities folder or accessed via Spotlight.
  2. Copy and paste the following command to download and install Homebrew.
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Press Enter to execute the command. The installation script will prompt you to continue. Press Enter again to begin the installation process.
  4. If prompted, enter your computer's password to allow the installation to proceed.

    You are granting the script permissions to write to system directories. Always ensure you trust the source before providing such permissions.

  5. Wait for the installation to complete. The process might take a few minutes, depending on your internet connection.
  6. Once the installation is finished, add Homebrew to your shell profile to ensure it's available every time you open the Terminal.
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/yourusername/.zprofile
      - eval "$(/opt/homebrew/bin/brew shellenv)"
  7. Test the installation by typing:
    $ brew help

    This should display the Homebrew help message, confirming its successful installation.

  8. To update the package list and ensure you have the latest versions available, run:
    $ brew update
  9. Begin installing packages! For instance, to install wget, simply type:
    $ brew install wget

    Homebrew also provides a “cask” feature, allowing you to install graphical applications. Example:

    $ brew install --cask firefox
Discuss the article:

Comment anonymously. Login not required.