How to Install Homebrew on macOS

Difficulty
Intermediate
Tested on
macOS 15.1 - MacBook Pro M3
You will need
Active internet connection, Administrator account, Terminal application

Step by step

  1. 1 min

    Install Command Line Tools

    Open Terminal from Applications > Utilities. Execute the command 'xcode-select --install' to trigger the installation of essential developer tools required for Homebrew, then click 'Install' on the system dialog.

    Note: If you already have the tools installed, the terminal will return an error stating the software is already installed.
  2. 1 min

    Run the installation script

    Copy and paste the installation command from the official Homebrew website into your Terminal window. Press Enter to execute the script and initiate the download process.

    Note: Verify the URL source is brew.sh before executing any scripts.
  3. 30 sec

    Enter your administrator password

    When prompted by the script, enter your Mac user password. Note that no characters will appear on the screen as you type, which is standard security behavior for the Terminal.

    Note: Ensure your account has administrator privileges to authorize the installation of system-level files.
  4. 1 min

    Add Homebrew to your PATH

    Observe the 'Next steps' output in the Terminal after the script completes. Copy the two export commands provided under the 'Next steps' section and paste them into your Terminal to update your shell configuration.

    Note: These commands ensure your shell recognizes the 'brew' command in future sessions.
  5. 30 sec

    Confirm the installation

    Run the command 'brew doctor' in your Terminal. The system will check for potential issues and confirm that the environment is ready for use.

    Note: If the output indicates 'Your system is ready to brew', the installation is successful.