For many Mac users, macOS feels polished and complete until they need to install developer tools, command line utilities, open source libraries, or everyday productivity software from the terminal. That is where Homebrew becomes essential. Often described as “the missing package manager for macOS”, Homebrew provides a reliable way to install, update, and manage software that Apple does not include by default.
TLDR: Homebrew is a trusted package manager that lets you install thousands of tools and applications on your Mac using simple terminal commands. To install it, open Terminal and run the official installation command from the Homebrew website, then follow the on-screen instructions to add Homebrew to your shell path. After installation, run brew doctor to check your setup and use commands such as brew install, brew update, and brew upgrade to manage software safely.
How to Install Homebrew on Mac: The Missing Package Manager
Homebrew is one of the most widely used tools in the macOS developer and power-user community. It simplifies the process of installing software that would otherwise require manual downloads, configuration, compilation, or dependency management. Whether you are setting up a development environment, installing Git, managing Python versions, using Node.js, or adding command line utilities such as wget and htop, Homebrew provides a consistent and professional workflow.
Unlike downloading applications one by one from different websites, Homebrew uses a central package system. You request a tool by name, and Homebrew handles the download, installation, linking, and updates. This makes your Mac easier to maintain and reduces the risk of having outdated or inconsistently installed software.
What Is Homebrew?
Homebrew is a free and open source package manager for macOS and Linux. On a Mac, it fills a practical gap: macOS does not include a built-in package manager comparable to apt on Debian or Ubuntu, dnf on Fedora, or pacman on Arch Linux.
With Homebrew, you can install command line tools, programming languages, system libraries, databases, and even desktop applications. Traditional command line packages are called formulae, while macOS applications installed through Homebrew are often managed as casks.
For example, you can install Git with:
brew install git
Or install a graphical application such as Google Chrome with:
brew install --cask google-chrome
This approach is efficient, repeatable, and especially valuable when setting up a new Mac or maintaining multiple machines.
Before You Install Homebrew
Before installing Homebrew, make sure your Mac meets a few basic requirements. Homebrew supports modern versions of macOS, and it works on both Apple Silicon Macs such as M1, M2, and M3 models, as well as older Intel-based Macs.
You should also have access to an administrator account, because the installation may ask for your password. This is normal. Homebrew needs permission to create directories and configure parts of your system so that packages can be installed correctly.
You will also need Apple’s Command Line Tools. In many cases, the Homebrew installer will prompt you to install them automatically if they are missing. These tools include important components such as compilers and system utilities that many packages require.
Step 1: Open Terminal
To begin, open the Terminal application on your Mac. You can find it by using Spotlight Search:
- Press Command + Space.
- Type Terminal.
- Press Return to open it.
You can also find Terminal in:
Applications > Utilities > Terminal
Terminal is where you will run the installation command and later manage Homebrew packages.
Step 2: Run the Official Homebrew Installation Command
The safest way to install Homebrew is to use the official installation command provided by the Homebrew project. In Terminal, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This command downloads and runs the official Homebrew installation script from the project’s GitHub repository. The script will explain what it is about to do before making changes. Read the output carefully, then press Return when prompted to continue.
You may be asked to enter your Mac password. When typing your password in Terminal, you usually will not see characters appear on the screen. This is expected behavior and does not mean Terminal is frozen. Type your password and press Return.
Security note: It is good practice to understand commands before running them, especially commands downloaded from the internet. Homebrew is a reputable open source project, but you should still use the official source and avoid copying modified installation commands from unknown websites.
Step 3: Add Homebrew to Your PATH
After installation, Homebrew may show instructions for adding it to your shell environment. This step is important because it allows you to run the brew command from Terminal.
On Apple Silicon Macs, Homebrew is usually installed in:
/opt/homebrew
On Intel Macs, it is usually installed in:
/usr/local
If you are using an Apple Silicon Mac, the installer may ask you to run commands similar to these:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
If you are using an Intel Mac, Homebrew may already be available automatically, but if it is not, follow the instructions printed by the installer. The exact commands can vary depending on your shell configuration, so it is best to follow the output shown in your Terminal.
Modern versions of macOS use zsh as the default shell. Older systems may use bash. Homebrew detects your environment and provides relevant instructions.
Step 4: Verify the Installation
Once the installation is complete, verify that Homebrew is working by running:
brew --version
You should see the installed Homebrew version printed in Terminal. Next, run:
brew doctor
This command checks your Homebrew setup for common issues. If everything is configured correctly, you may see:
Your system is ready to brew.
If Homebrew reports warnings, read them carefully. Many warnings are informational and include suggested fixes. For a new installation, the most common issue is that Homebrew has not yet been added correctly to your PATH.
Installing Your First Package
After Homebrew is installed, you can begin installing software. A practical first example is wget, a command line tool for downloading files:
brew install wget
Homebrew will download the package and any required dependencies. When it finishes, you can check that the tool is available by running:
wget --version
Another common package is Git:
brew install git
Although macOS may include a version of Git through Apple’s developer tools, the Homebrew version is often more current and easier to update.
Using Homebrew Cask for Mac Applications
Homebrew is not limited to command line utilities. With Homebrew Cask, you can install many standard macOS applications from Terminal. For example:
brew install --cask visual-studio-code
Other popular cask examples include:
firefoxgoogle-chromeslackiterm2docker
This is useful when setting up a new Mac because you can install many applications quickly without visiting each vendor’s website individually.
Essential Homebrew Commands
Once Homebrew is installed, you should know the basic commands for day-to-day maintenance:
- Update Homebrew package data:
brew update - Upgrade installed packages:
brew upgrade - Search for a package:
brew search package-name - Install a package:
brew install package-name - Uninstall a package:
brew uninstall package-name - List installed packages:
brew list - Show package information:
brew info package-name - Clean old downloads and versions:
brew cleanup
A good maintenance routine is to periodically run:
brew update
brew upgrade
brew cleanup
brew doctor
This keeps your installed tools current and helps detect configuration problems early.
Understanding Formulae and Casks
Homebrew uses two main categories of installable software. A formula is usually a command line tool, library, service, or programming language. Examples include python, node, postgresql, git, and openssl.
A cask is typically a macOS desktop application. Examples include browsers, editors, communication tools, and utilities. Casks integrate Homebrew with the normal macOS application installation model.
This distinction matters because command line packages are installed with:
brew install package-name
Desktop applications are commonly installed with:
brew install --cask app-name
If you are unsure whether something is available as a formula or cask, use:
brew search name
Common Installation Problems and Fixes
Most Homebrew installations are straightforward, but a few issues are common.
The brew Command Is Not Found
If Terminal says brew: command not found, Homebrew is installed but not available in your PATH, or the installation did not complete. Review the final instructions printed by the installer. On Apple Silicon Macs, running the following often fixes the issue:
eval "$(/opt/homebrew/bin/brew shellenv)"
To make the change permanent, add the appropriate eval line to your shell profile, typically ~/.zprofile.
Command Line Tools Are Missing
If Homebrew reports that Apple Command Line Tools are missing, install them with:
xcode-select --install
A system dialog should appear. Follow the prompts, allow the installation to finish, and then run the Homebrew installation or command again.
Permission Errors
Homebrew is designed to avoid unnecessary use of sudo after installation. If you experience permission errors, do not randomly change ownership of system folders. Instead, read the Homebrew error message and consult the official documentation. Incorrect permission changes can create security or stability problems.
Is Homebrew Safe?
Homebrew is widely trusted, open source, and used by developers, system administrators, researchers, and technical teams around the world. However, no package manager should be treated carelessly. You should install software only from sources you trust and review unfamiliar packages before adding them to your system.
Homebrew itself is transparent. Formulae and casks are maintained in public repositories, and the project has established review processes. Still, the responsibility for what you install remains yours. A serious approach is to keep Homebrew updated, remove tools you no longer use, and avoid installing unknown packages without checking their purpose.
How to Uninstall Homebrew
If you ever need to remove Homebrew, the project provides an official uninstall script. You can find the current uninstall instructions in the Homebrew documentation. A typical uninstall command looks like this:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
As with installation, read the script output carefully before confirming. Uninstalling Homebrew may remove packages installed through Homebrew, but it will not necessarily remove every configuration file created by those tools.
Final Thoughts
Installing Homebrew is one of the most practical improvements you can make to a Mac, especially if you use development tools, open source software, or command line workflows. It gives macOS a dependable package management system and makes software installation more predictable.
The installation process is simple: open Terminal, run the official installer, follow the PATH instructions, and verify the setup with brew doctor. After that, Homebrew becomes a central tool for installing, updating, and maintaining software on your Mac. Used carefully, it is a serious and trustworthy addition to any macOS environment.