Homebrew is the most popular package manager for macOS, making it easy to install and manage software tools that aren’t included with your Mac. If you’re setting up a new machine or getting started with development work, Homebrew simplifies the process of installing the tools you need. Homebrew installs packages to their own directory and then creates symbolic links to make them accessible, saving you from the hassle of manual installations.
The installation process for Homebrew has been streamlined in 2025, requiring just a few Terminal commands to get up and running. Before installing Homebrew, you’ll need to check your macOS version and ensure Xcode Command Line Tools are installed on your system. Mac users with Apple Silicon chips (M1, M2, or M3) will need to follow slightly different steps for configuring their shell after installation.
Once installed, Homebrew becomes your gateway to thousands of useful packages and applications through simple commands like “brew install.” This tool has become essential for developers, designers, and power users who want to customize their Mac experience beyond what Apple provides out of the box.
Install Homebrew on a Mac (2025 Edition)
Homebrew is the de facto package manager for macOS, enabling you to install and manage thousands of open-source tools, libraries, and apps with ease. Whether you’re a developer, sysadmin, or just a power user, Homebrew dramatically expands what your Mac can do. In 2025, Homebrew remains essential — and installing it is easier than ever, thanks to native support for Apple Silicon (M1, M2, M3) and the latest macOS versions like Sonoma and Sequoia.
Let’s walk through everything you need to know — from prerequisites to installation, shell setup, troubleshooting, and advanced usage.
Prerequisites Before Installing Homebrew
Before jumping in, make sure your Mac is ready:
- macOS Ventura (13) or later is recommended. Works seamlessly with macOS Sonoma and Sequoia (15).
- 64-bit Intel or Apple Silicon processor (M1, M2, M3).
- Administrator privileges (you’ll be asked for your Mac password).
- Xcode Command Line Tools — required for compiling and running most packages.
💡 Tip: If you’re unsure whether the Command Line Tools are installed, run
xcode-select -p
in Terminal. If nothing is returned, you’ll need to install them.
Step-by-Step Homebrew Installation
1. Install Xcode Command Line Tools
Open Terminal (Applications > Utilities), then run:
xcode-select --install
Accept the prompts to begin the installation. This installs essential developer tools and compilers needed for many Homebrew packages.
2. Install Homebrew Itself
Once Xcode tools are installed, run the Homebrew install script:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
You’ll be prompted for your administrator password. Homebrew will install to:
/opt/homebrew
on Apple Silicon Macs/usr/local
on Intel-based Macs
🛡️ The script performs system checks and suggests follow-up configuration if anything is missing. Let it complete fully before continuing.
3. Add Homebrew to Your Shell Profile (Apple Silicon Macs)
If you’re on an M1/M2/M3 Mac, Homebrew might not be immediately available in your Terminal unless you configure your shell environment. Run:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
This ensures that every new terminal session will recognize the brew
command automatically.
4. Test Your Installation
To make sure everything’s working:
brew doctor
If you see:
Your system is ready to brew.
You’re all set.
Optional: Turn Off Homebrew Analytics
Homebrew tracks anonymous usage statistics. If you’d prefer not to participate, run:
brew analytics off
You can always turn it back on later with brew analytics on
.
How To Use Homebrew
Here are the basic commands you’ll use regularly:
Install a Package
brew install <package_name>
Example:
brew install wget
Update Homebrew
brew update
This refreshes the list of available packages and their latest versions.
Upgrade Installed Packages
brew upgrade
This updates all previously installed formulae and casks to their latest versions.
Uninstall a Package
brew uninstall <package_name>
How To Uninstall Homebrew
If you ever want to remove Homebrew completely:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
The script walks you through removing Homebrew files and directories from your system.
Pro Tips
- Install GUI apps with Homebrew Cask:
brew install --cask google-chrome
- Search for packages:
brew search <keyword>
- View info about a package:
brew info <package_name>
- Fix permissions or issues: Run
brew doctor
regularly
Why Developers and Power Users Love Homebrew
Homebrew brings Linux-style package management to macOS. It fills the gap that Apple left open for power users, offering simple access to thousands of command-line tools, programming languages, libraries, and even desktop apps.
It’s actively maintained, with community support and integrations with automation tools, CI/CD workflows, and developer environments like Docker, Git, and Python.
With Homebrew set up, your Mac becomes a more powerful, customizable, and developer-friendly machine — one command at a time.
Key Takeaways
- Homebrew simplifies software installation on Mac by managing packages through the Terminal with straightforward commands.
- Before installation, users need to update macOS and install Xcode Command Line Tools for proper functionality.
- Apple Silicon Mac users (M1/M2/M3) require additional shell configuration steps after the basic Homebrew installation.
Preparing Your Mac for Homebrew Installation
Before installing Homebrew on your Mac, you need to prepare your system with a few essential components. These preparations ensure a smooth installation process and proper functioning of Homebrew once installed.
Verifying macOS Compatibility
Homebrew works on macOS 10.14 (Mojave) or higher, including the latest macOS versions. As of March 2025, all recent Mac systems should be compatible, but it’s still important to check your version.
To check your macOS version, click the Apple menu in the top-left corner and select About This Mac. The version number will appear prominently on the window that opens.
Mac users with Apple Silicon (M1, M2, or newer chips) need to be aware that Homebrew installs to a different location (/opt/homebrew) than on Intel Macs (/usr/local). This distinction is handled automatically during installation.
If you’re running an older version of macOS, consider upgrading before installing Homebrew to avoid compatibility issues with newer packages.
Installing Command Line Tools for Xcode
Command Line Tools for Xcode is a crucial dependency for Homebrew. These tools provide essential development components like compilers without requiring the full Xcode installation.
To install Command Line Tools:
- Open Terminal (found in Applications > Utilities)
- Run this command:
xcode-select --install
- Click Install on the prompt that appears
- Wait for the download and installation to complete (usually 5-15 minutes)
You can verify the installation was successful by running:
xcode-select -p
This should return a path like /Library/Developer/CommandLineTools
. If you encounter any issues, you can download the tools directly from the Apple Developer website.
Setting Up the Terminal Environment
The Terminal app is where you’ll interact with Homebrew. macOS comes with Terminal pre-installed in the Applications > Utilities folder.
Modern Macs use zsh as the default shell, while older systems might use bash. You can check your current shell by running:
echo $SHELL
Homebrew will automatically update your shell configuration files (like .zprofile
for zsh or .bash_profile
for bash) during installation to add Homebrew to your PATH.
For the best experience, consider:
- Familiarizing yourself with basic Terminal commands
- Ensuring your user account has administrative privileges
- Closing and reopening Terminal after installing Homebrew to apply PATH changes
If you prefer a more feature-rich Terminal experience, alternatives like iTerm2 work perfectly with Homebrew and offer additional features.
Executing Homebrew Installation
Installing Homebrew on your Mac involves running a specific command and performing a few setup steps. Once installed, you can use this powerful package manager to install and manage various software packages without the hassle of manual downloads and configurations.
Using the Homebrew Installation Command
To install Homebrew on your Mac, open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This command downloads and executes the Homebrew installation script. The script uses curl
to fetch the installation file while the -fsSL
flags ensure a quiet and reliable download.
For Apple Silicon Macs (M1, M2, etc.), Homebrew installs to /opt/homebrew
, while Intel Macs use /usr/local
. The installer will ask for your password to set up necessary permissions.
Before running the installation, make sure Xcode Command Line Tools are installed. If not, run:
xcode-select --install
Performing Post-Installation Checks and Setup
After installation completes, run brew doctor
to check for potential issues. This command verifies your Homebrew installation and suggests fixes for any problems it finds.
brew doctor
For Apple Silicon Macs, add Homebrew to your PATH by adding these lines to your ~/.zprofile
:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Run brew update
to ensure you have the latest package definitions. This command synchronizes your local Homebrew with the remote repository, giving you access to the newest packages.
Homebrew collects anonymous analytics by default. To disable this feature, run:
brew analytics off
Managing Homebrew Packages
Once Homebrew is set up, installing packages becomes simple. Use brew install
followed by the package name:
brew install wget
brew install python
brew install gcc
Popular packages include imagemagick
for image processing, rsync
for file transfers, and gnuplot
for data visualization. For applications with graphical interfaces, use:
brew install --cask docker
To remove packages, use either brew uninstall
or brew remove
:
brew uninstall protobuf
View all installed packages with:
brew list
To update installed packages, run:
brew upgrade
If issues occur, use brew doctor
to diagnose problems or check the Homebrew documentation for troubleshooting tips.
Frequently Asked Questions
Homebrew installation on Mac systems can present unique challenges depending on your hardware and software configuration. Here are answers to some common questions users face during setup and troubleshooting.
What are the steps for installing Homebrew on a Mac with an M1 chip?
Installing Homebrew on an M1 Mac requires a few specific steps. Users should first open Terminal and run the official installation command from the Homebrew website.
The system may prompt for administrator password during installation. After installation completes, users need to add Homebrew to their PATH by updating their shell profile.
M1 Mac users might need to prefix certain commands with arch -arm64
to ensure software runs natively on Apple Silicon rather than through Rosetta translation.
How can I resolve the ‘zsh: command not found: brew’ error after attempting a Homebrew installation?
This error typically occurs when Homebrew is installed but not properly added to the PATH environment variable. The solution is to add Homebrew to the PATH in the shell configuration file.
For zsh users, edit the .zshrc
file in the home directory by adding: export PATH="/opt/homebrew/bin:$PATH"
for M1 Macs or export PATH="/usr/local/bin:$PATH"
for Intel Macs.
After saving the file, run source ~/.zshrc
to apply changes without restarting the terminal.
What should I do when I encounter the ‘Brew command not found’ error on my Mac?
First, verify if Homebrew is actually installed by checking for the Homebrew directory. On Intel Macs, look in /usr/local/
, and on M1 Macs, check /opt/homebrew/
.
If Homebrew is installed but the command isn’t found, the issue is likely with the PATH configuration. Update the shell profile as described in the previous answer.
Sometimes reinstalling Homebrew completely resolves persistent issues. Run the uninstallation script first, then reinstall using the official installation command.
How do I install packages like Git or Python using Homebrew on a Mac?
Installing packages with Homebrew is straightforward. Open Terminal and use the command brew install
followed by the package name, such as brew install git
or brew install python
.
Before installing, it’s good practice to run brew update
to ensure Homebrew has the latest package information. This helps avoid compatibility issues.
To see what packages are available, use brew search
followed by a keyword. For example, brew search python
will show all Python-related packages.
Where can I find official Homebrew documentation or its GitHub repository for troubleshooting?
The official Homebrew documentation is available at https://docs.brew.sh, which contains comprehensive guides, FAQs, and troubleshooting information.
Homebrew’s GitHub repository can be found at https://github.com/Homebrew/brew, where users can review open issues or submit new ones if they encounter bugs.
The Homebrew community is also active on discussion forums and platforms like Stack Overflow, where specific installation or usage problems are often addressed.
How can differences between ‘brew’ and Homebrew impact package installations on a Mac?
“brew” is simply the command-line interface for Homebrew, not a separate tool. Any reference to differences is likely a misunderstanding of terminology.
When users type brew install
in Terminal, they are using the Homebrew package manager to install software. The brew command won’t work if Homebrew isn’t properly installed.
Occasionally, users might confuse Homebrew with other package managers like MacPorts or Fink, which are alternative systems that work differently and maintain separate package repositories.