Homebrew is a package manager for Mac. It installs software from the command line - things like Python, Node.js, git, and thousands of other tools.

If you ever need to install developer tools or command-line utilities, you'll probably use Homebrew.

What It Does

Instead of:

  1. Going to a website
  2. Downloading a .dmg
  3. Opening it
  4. Dragging to Applications
  5. Maybe configuring PATH

You just type:

brew install node

Done. Node.js is installed and ready to use.

Should You Install It?

Install Homebrew if you:

  • Need to install developer tools (Node.js, Python, Git, etc.)
  • Follow tutorials that say "run brew install"
  • Want an easy way to keep tools updated
  • Work with the command line regularly

Skip it if you:

  • Only use your Mac for browsing and documents
  • Never use Terminal
  • Prefer downloading apps from the App Store only

Installing Homebrew

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

Follow the prompts. After installation, you may need to add Homebrew to your PATH (the installer tells you how).

Basic Commands

Command What it does
brew install name Install a package
brew uninstall name Remove a package
brew update Update Homebrew itself
brew upgrade Upgrade all installed packages
brew list See what's installed
brew search name Search for packages
brew info name Get info about a package

What Can You Install?

Almost anything:

Languages: Python, Node.js, Ruby, Go, Rust

Databases: PostgreSQL, MySQL, MongoDB, Redis

Tools: git, wget, curl, ffmpeg, imagemagick

Apps: VS Code, Chrome, Slack, Discord (via cask)

Search for packages at formulae.brew.sh.

Formulae vs Casks

Homebrew has two types of packages:

Type What it is Example
Formula Command-line tools brew install git
Cask GUI applications brew install --cask visual-studio-code

Casks install regular Mac apps, just via Terminal.

Keeping Things Updated

Update everything:

brew update && brew upgrade

Run this occasionally to keep your tools current.

Where Does It Install Things?

Mac Type Location
Apple Silicon (M1, M2, etc.) /opt/homebrew/
Intel /usr/local/

Homebrew manages its own folder. It doesn't scatter files across your system.

Is It Safe?

Yes. Homebrew is:

  • Open source with thousands of contributors
  • The standard way to install dev tools on Mac
  • Used by millions of developers

Packages are reviewed before being added. It's safer than downloading random .dmg files from the internet.

Common Issues

"command not found: brew" after installing:

Add Homebrew to your PATH. For Apple Silicon:

echo 'eval "\$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc

Permission errors:

Don't use sudo with brew. If you have permission issues:

sudo chown -R \$(whoami) /opt/homebrew

Uninstalling Homebrew

If you ever want to remove it:

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

This removes Homebrew and everything installed through it.

The Bottom Line

If you do any development or use command-line tools, install Homebrew. It's the standard package manager for Mac and makes installing software trivial.

If you only use your Mac for email and browsing, you don't need it.


Keep Learning

Homebrew is one tool in the Terminal toolkit. The free course covers the fundamentals that make all these tools easier to use.

Check it out at Mac Terminal for Humans.