Install and Use Homebrew on a Mac

Questions

  • 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?
  • How do I install a package with Homebrew?

Environment

Homebrew is a free, open-source package management system that simplifies installing software on macOS. This article applies to anyone using a Mac.

Resolution

Installing Homebrew

  1. On your Mac, open the Terminal application, found in the /Applications/Utilities folder.
  2. Type or copy and paste the following command, all on one line, then press Return:

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

  3. Enter your computer password when prompted.
  4. Press Return when prompted.
  5. Watch the installation progress. After about 5 minutes you should see Next steps when it is complete.
  6. Run the first command listed under Next steps by copying and pasting it into Terminal and pressing Return. The command looks something like the following, where USERNAME is your username:

    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/USERNAME/.zprofile

  7. Run the second command listed under Next steps by copying and pasting it into Terminal and pressing Return:

    eval "$(/opt/homebrew/bin/brew shellenv)"


Using Homebrew

  • Homebrew installs packages into their own directory, /opt/homebrew/bin.
  • To install a package, this example installs wget:
    1. Open the Terminal application from the /Applications/Utilities folder.
    2. Type the following command and press Return: brew install wget
    3. Watch the downloading and installing process.
  • Type brew help to see additional Homebrew commands.

Additional Help

If you need further assistance, you have several options:

  • Bowdoin Bot: Chat with Bowdoin Bot directly from any KB page for instant answers.
  • Phone: Call the Bowdoin College Service Desk at (207) 725-3030.
  • In person: Visit the Tech Hub in Smith Union during business hours.
  • Submit a ticket: Request assistance through the Service Catalog.

Additional Resources