How to Install and Use Homebrew

Question

Homebrew is a free, open-source software package management system that simplifies the installation of software on Apple's operating system, macOS.

  • How do I install and use Homebrew?
  • How do I install HomeBrew on my Mac?
  • Can anyone install HomeBrew for macOS?
  • How do I access or use HomeBrew?

Environment

  • Anyone using a Mac with a version of macOS installed.

Resolution

Installing Homebrew

  • On your computer running macOS open the Terminal application. This can be found in /Applications/Utilities folder.
  • Type in or copy and paste the following command (all on one line): 

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
     
  • Press Return
  • Enter your computer password when prompted.
  • Press Return when prompted.
  • You will see the progress of the installation and after about 5 minutes should see  Next steps when its complete.
  • Run the first command it suggests under next steps by copying and pasting it into Terminal and pressing enter
    • The command would look something like this echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/USERNAME/.zprofile but USERNAME would be your username.
  • Run the second command it suggests under next steps by copying and pasting it into terminal and pressing enter. 
    • The command would look like this eval "$(/opt/homebrew/bin/brew shellenv)"

Using Homebrew

  • Homebrew installs packages to their own directory /opt/homebrew/bin.
  • In this example we will use Homebrew to install wget.
    • On your computer running macOS open the Terminal application. This can be found in /Applications/Utilities folder.
    • Type in the following command: brew install wget and press Return.
    • You will see downloading and installing process. 
  • Type in brew help to see additional Homebrew commands.

If you need further assistance, please contact the Bowdoin College Service Desk