How to Install Homebrew on Mac 2025
If you've ever tried to install developer tools or command-line utilities on your Mac, you've probably noticed something's missing. Unlike Linux systems with their built-in package managers, macOS doesn't come with an easy way to install and manage software from the terminal. That's where Homebrew comes in. In this guide, I'll walk you through everything you need to know to install Homebrew on Mac and start using it like a pro.
What Is Homebrew?
Homebrew is the package manager that macOS should've had from the beginning. Think of it as an App Store for your command line—except everything's free and you get way more control over what you're installing.
At its core, Homebrew lets you install, update, and manage software packages directly from your terminal. No more hunting down .dmg files, dragging icons to your Applications folder, or manually checking for updates. Whether you need Python, Git, Node.js, or hundreds of other tools, Homebrew handles it all with simple commands.
The best part? Homebrew works seamlessly on both Intel and Apple Silicon Macs (M1, M2, M3, and beyond). It's also available for Linux, though it really shines on macOS where it fills that package management gap.
Prerequisites
Before you install Homebrew on Mac, let's make sure you've got everything ready:
macOS Version: You'll need macOS 10.15 (Catalina) or newer. Most modern Macs are already running this or later.
Internet Connection: The installation downloads files from the internet, so make sure you're connected.
Xcode Command Line Tools: This is the big one. Homebrew needs Apple's developer tools to compile and install packages. Don't worry though—the Homebrew installer will prompt you to install these if you don't have them already.
Basic Terminal Knowledge: You don't need to be a command-line wizard, but knowing how to open Terminal and type commands will help. If you're new to this, don't sweat it—I'll explain each step.
How To Install Homebrew on macOS
Ready to get started? The process to install Homebrew on Mac is surprisingly straightforward. Let's break it down step by step.
1. Open Terminal
First things first—you need to open Terminal. Here's the easiest way:
Press Command + Space to open Spotlight search, then type "Terminal" and hit Enter. You can also find it in Applications → Utilities → Terminal if you prefer clicking around.
Once Terminal opens, you'll see a command prompt waiting for your input. This is where the magic happens.

2. Run the Installation Command
Now for the main event. Copy and paste this command into your Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Hit Enter, and the installation script will start running.
What's this command actually doing? It's using curl to download the official Homebrew installation script from GitHub, then running it with Bash. The script is maintained by the Homebrew team, so it's completely safe.
During installation, you'll see a few prompts:
- Enter your password: This is your Mac login password. You won't see any characters appear as you type—that's normal for Terminal password entries.
- Press RETURN to continue: The script will explain what it's about to do. Read through it if you're curious, then press Enter.
The installation might take a few minutes, especially if it needs to download and install Xcode Command Line Tools. Grab a coffee and let it do its thing.
3. Set Up Environment Variables
Here's where things get slightly different depending on your Mac.
For Apple Silicon Macs (M1/M2/M3):
After installation completes, you'll need to add Homebrew to your PATH. Run these two commands:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
For Intel Macs:
The installer usually handles this automatically, but if it doesn't, use this instead:
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"
Why is this necessary? Homebrew installs itself in different locations depending on your Mac's processor. These commands tell your shell where to find the brew command. The first command adds it permanently to your shell configuration, and the second applies it to your current session.
4. Verify Installation
Let's make sure everything worked. Type this command:
brew --version
If you see something like Homebrew 4.3.15 (the exact version number will vary), congratulations! You've successfully installed Homebrew on Mac.
If you get a "command not found" error, double-check that you ran the PATH setup commands correctly in step 3.
How To Use Homebrew
Now that you've installed Homebrew on Mac, let's explore how to actually use it. These are the commands you'll use constantly.
1. Search for a Package
Not sure if Homebrew has what you need? Search for it:
brew search python
This will show you all packages with "python" in the name. You'll see results like [email protected], [email protected], and related packages.
2. Install a Package
Found what you need? Install it with:
brew install python
Homebrew will download and install Python along with any dependencies it needs. The process is automatic—just wait for it to finish.
You can install multiple packages at once too:
brew install git node wget
3. List Installed Packages
Forgot what you've installed? Check your list:
brew list
This shows everything Homebrew has installed on your Mac. It's handy for keeping track of your tools.
4. Update and Upgrade Packages
One of Homebrew's best features is easy updates. First, update Homebrew itself:
brew update
This fetches the latest package information. Then upgrade your installed packages:
brew upgrade
This updates all your packages to their newest versions. You can also upgrade specific packages:
brew upgrade python
5. Uninstall a Package
Don't need something anymore? Remove it:
brew uninstall python
Clean and simple. The package is gone.
6. Check for Issues
Homebrew has a built-in diagnostic tool:
brew doctor
Run this if something seems off. It'll check your installation and suggest fixes for any problems it finds. I run this every few months just to keep things tidy.
Installing Casks (GUI Applications)
Here's where Homebrew gets really powerful. Beyond command-line tools, you can install regular GUI applications too—what Homebrew calls "casks."
The difference is simple:
- Formulae: Command-line tools and libraries (like Python, Git, etc.)
- Casks: Regular applications with graphical interfaces (like Chrome, VS Code, etc.)
To install a cask, use the --cask flag:
brew install --cask google-chrome
This downloads and installs Chrome just like you'd normally do, but from the command line. Other popular casks include:
brew install --cask visual-studio-code
brew install --cask firefox
brew install --cask slack
brew install --cask spotify
You can search for casks the same way:
brew search --cask chrome
This is honestly one of my favorite Homebrew features. Setting up a new Mac? Just write a script with all your cask installs and run it. Everything gets installed automatically.
How To Uninstall Homebrew
Changed your mind? You can completely remove Homebrew from your Mac with this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
This is the official uninstall script. It'll remove Homebrew and all the packages you installed with it. Just be aware that any packages you've installed will be gone too, so make sure that's what you want.
Common Errors and Fixes
Even when you carefully install Homebrew on Mac, you might run into issues. Here are the most common ones:
"command not found: brew"
This usually means your PATH isn't set correctly. Go back to step 3 in the installation section and make sure you ran those echo commands. You might need to close and reopen Terminal afterward.
Permission Errors
If Homebrew complains about permissions, make sure you're not running commands with sudo. Homebrew is designed to run as your regular user, not as root. If you've accidentally changed ownership of Homebrew files, you might need to fix permissions:
sudo chown -R $(whoami) /opt/homebrew
(Use /usr/local instead of /opt/homebrew if you're on an Intel Mac.)
Network Issues
Behind a corporate firewall or proxy? You might see download failures. Check your network settings or try connecting to a different network. Sometimes switching from WiFi to a wired connection helps.
Xcode Command Line Tools Issues
If the automatic Xcode tools installation fails, install them manually:
xcode-select --install
Conclusion
Learning how to install Homebrew on Mac is one of the best things you can do as a Mac user who works with developer tools or just wants more control over their software. It turns your Mac into a powerhouse for installing and managing pretty much any tool you can think of.
The beauty of Homebrew is its simplicity. Once you install Homebrew on Mac, you've got access to thousands of packages with just a few keystrokes. No more downloading installers, clicking through setup wizards, or manually checking for updates.
Start exploring the available formulae and casks—you'll be amazed at what's available. Check out the official Homebrew documentation at brew.sh for more advanced features and a complete package list.
FAQs
Is Homebrew safe?
Absolutely. Homebrew is open-source and maintained by a large community. The formulas are reviewed before being accepted, and the project has been around since 2009. Millions of developers use it daily. Just make sure you're downloading from the official sources (brew.sh or the GitHub repository).
Can I use Homebrew with zsh or fish shells?
Yes! Homebrew works with any shell. macOS switched from Bash to Zsh as the default shell in Catalina, and Homebrew handles both automatically. If you use fish or another shell, you might need to adjust the PATH setup commands slightly, but it's fully supported.
Does Homebrew work on Apple Silicon?
It sure does. When you install Homebrew on Mac with an M1, M2, or M3 chip, it installs to /opt/homebrew and compiles packages natively for ARM architecture. Most popular packages have been updated for Apple Silicon. You might occasionally find something that needs Rosetta 2, but that's increasingly rare.
