How to Install Brew: A Step-by-Step Guide for Every Experience Level

Homebrew (commonly called "Brew") is a package manager for macOS and Linux — software that handles downloading, installing, and updating programs from the command line. If you're new to the terminal or haven't used package managers before, the process can seem intimidating. It's actually straightforward once you understand what's happening at each step.

What Brew Does (And Why It Matters)

Brew automates what you'd otherwise do manually: visiting a website, downloading a file, running an installer, and managing updates. Instead, you type a single command, and Brew handles the rest. This becomes especially valuable if you use multiple open-source tools or developer software.

Key things to know upfront:

  • Brew requires macOS 10.13 or later, or a Linux distribution
  • You'll interact with it through the Terminal (a text-based command interface)
  • Installation itself takes just minutes
  • You don't need to be a developer to use it — many everyday utilities are available through Brew

Prerequisites: What You'll Need

Before installing Brew, you should have:

  • Administrator access on your computer (the ability to enter your password when prompted)
  • An internet connection (Brew downloads files from the internet)
  • Terminal access — already built into macOS and most Linux systems
  • Xcode Command Line Tools (on macOS) — Brew will prompt you to install this if needed

If you've never opened Terminal before, search for "Terminal" in Spotlight (Command + Space on Mac) and launch it. It's a safe tool; typing the right commands is what matters.

The Installation Process ����

Step 1: Open Terminal

On macOS, press Command + Space, type "terminal," and press Enter. On Linux, look for Terminal in your applications menu or press Ctrl + Alt + T.

Step 2: Copy and Paste the Installation Command

Brew's official site provides a single command that downloads and runs the installer. As of recent versions, the command begins with /bin/bash -c and pulls a script from Brew's repository.

Why paste, not type? The command is long and exact syntax matters. Typing risks errors that will fail silently or produce confusing messages.

To find the current official installation command, visit brew.sh in your web browser. Copy the command shown there.

Step 3: Paste Into Terminal and Press Enter

Right-click in Terminal (or Command + V) and paste the command. Press Enter. Brew will:

  1. Ask for your password — this is normal and necessary for installation
  2. Download and extract Brew's core files
  3. Install Xcode Command Line Tools (on macOS) if you don't have them — this may take several minutes
  4. Complete the installation and display a success message

Step 4: Verify the Installation

After installation finishes, type:

Press Enter. You should see a version number (like "Homebrew 4.0.0"). This confirms Brew is installed and working.

Step 5: Run the Post-Install Setup (If Prompted)

On some systems, especially newer Macs, Brew may display additional setup steps after installation. Follow any on-screen instructions — usually these involve adding Brew to your system PATH (the list of places your computer looks for programs).

If prompted, copy and paste the suggested commands exactly as shown.

Common Installation Variables ⚙️

Your installation experience will vary based on:

FactorImpact
Your operating system versionOlder systems may need different commands or additional setup steps
Existing Xcode toolsIf already installed, setup is faster; if not, downloading takes time
Internet speedLarger downloads (like Xcode tools) depend on bandwidth
Administrator permissionsWithout these, installation will fail at the password prompt
Disk spaceBrew itself is small; Xcode tools require several gigabytes

What Happens If Something Goes Wrong

Common issues and what they typically mean:

  • "Command not found" — Brew isn't in your system PATH yet. Restart Terminal or run the PATH setup commands shown during installation.
  • "Permission denied" — You may not have entered your password correctly, or you lack administrator access.
  • Xcode tools download fails — Usually a network issue. Try again, or check your internet connection.
  • Disk space warning — You need several gigabytes free, especially if Xcode tools install.

If you hit an error, read the message carefully — it usually tells you what went wrong. You can also search the error message on Brew's GitHub or community forums; others have likely encountered it.

Next Steps After Installation

Once Brew is working, you're ready to install packages. The command structure is simple:

For example, brew install wget installs a file-downloading tool. To see what's available, visit formulae.brew.sh.

You can also update Brew itself (brew update) and upgrade installed packages (brew upgrade) as needed.

When to Seek Additional Help

Installation usually works without problems if you follow the official instructions carefully. If you're stuck:

  • Verify you used the command from brew.sh — don't rely on older instructions
  • Check that you have administrator access — you'll need it to enter your password
  • Ensure your macOS or Linux version is supported — very old systems may not work with current Brew
  • Review Brew's troubleshooting documentation — they cover edge cases and platform-specific issues

The process is designed to be accessible even if you're new to the command line. The key is following each step in order and reading the on-screen feedback.