How to Install Homebrew on Mac: A Complete Setup Guide

Homebrew is the most widely used package manager for macOS — a command-line tool that lets you install, update, and manage software libraries, utilities, and developer tools that don't come bundled with macOS. If you're doing any kind of web development, scripting, or command-line work on a Mac, understanding how to install and use Homebrew is a foundational skill.

What Homebrew Actually Does

Before diving into the installation steps, it helps to understand what you're actually installing. Homebrew acts as an intermediary between you and thousands of open-source software packages — called formulae (for command-line tools) and casks (for GUI applications). Instead of hunting down installers, managing paths manually, or dealing with version conflicts, Homebrew handles all of that through a single, consistent interface.

It installs packages into its own directory (/usr/local on Intel Macs, /opt/homebrew on Apple Silicon Macs) and then symlinks files into the appropriate system paths — keeping your macOS environment clean and organized.

System Requirements to Know Before You Start

Not every Mac is in the same position when it comes to Homebrew installation. A few key variables determine how smoothly the process goes:

  • macOS version: Homebrew officially supports macOS Ventura, Monterey, and Big Sur. Older versions (Catalina, Mojave, High Sierra) may work but receive limited support. Running a very old OS version can cause dependency issues.
  • Processor architecture: Apple Silicon Macs (M1, M2, M3 chips) and Intel Macs handle Homebrew differently. The install script detects your architecture automatically, but the default install path differs between the two — something to be aware of if you're configuring shell profiles manually.
  • Xcode Command Line Tools: Homebrew requires Apple's Xcode Command Line Tools, which include compilers and developer utilities. If you don't have them, the Homebrew installer will prompt you to install them automatically — but this step adds time and requires an internet connection.
  • Disk space: Homebrew itself is lightweight, but individual packages can be large. Having at least a few gigabytes free is a reasonable baseline.

Step-by-Step: Installing Homebrew on macOS 🍺

Step 1: Open Terminal

Open the Terminal app on your Mac. You can find it in Applications > Utilities > Terminal, or search for it with Spotlight (Cmd + Space, then type "Terminal").

Step 2: Run the Official Install Script

Paste the following command into Terminal and press Return: