Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Updated November 30, 2026 · Written and reviewed under our editorial policy
To install Homebrew, open Terminal and paste the install command from brew.sh: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". The script explains what it will do and pauses before making changes. On Apple Silicon Macs, run the "Next steps" commands it prints to add brew to your PATH, then run brew doctor.
To install Homebrew on a Mac:
brew --version and brew doctor.Source: brew.sh and the Homebrew documentation, "Installation", checked 2026-11-28.
Once brew works, most developer setup on a Mac is one command away: you can install Git, install Python on Mac or update Node.js from the same Terminal window.
Before you install Homebrew, check three things:
sudo, so you need your Mac's admin password.You run everything in Terminal, which is in Applications > Utilities. Any of the best terminal apps for Mac works too.
Installing Homebrew takes one command and a few prompts. After you paste the command from brew.sh and press Enter:
The official installer supports Apple Silicon Macs only and installs Homebrew to /opt/homebrew. Intel Macs are no longer supported: the script stops on them with "Homebrew on macOS is only supported on Apple Silicon processors!"
Setting up a dev Mac? Add Kane CLI next to run browser tests from the terminal. It installs with Homebrew too (brew install LambdaTest/kane/kane-cli); see how to install Kane CLI and run your first test.
On Apple Silicon Macs, Homebrew installs into /opt/homebrew. Homebrew's installation docs say it uses this prefix "so that you don't need sudo after Homebrew's initial installation when you install formulae". The installer adds /opt/homebrew/bin to the system PATH for new Terminal windows, but the window you installed from doesn't pick it up. That's why the installer prints Next steps. For the default zsh shell, they look like this:
echo >> /Users/<you>/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' >> /Users/<you>/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv zsh)"Copy the exact lines your installer prints, since they name your own home folder and shell. The first two lines add Homebrew's settings to ~/.zprofile for every new Terminal window; the last one loads them in the current one.
To check that Homebrew works, close and reopen Terminal, then run:
brew --version
brew doctorbrew --version prints the Homebrew version. brew doctor checks your setup and prints Your system is ready to brew. when nothing needs fixing. Any warnings it lists are advice; deal with the ones about your PATH or the Command Line Tools first. which brew should print /opt/homebrew/bin/brew.
Installing your first package with Homebrew takes one command. Git is a good first one:
brew install gitbrew install git gives you a current Git; other options are in how to install Git. Command-line tools like Git are formulae (brew install name); Mac apps are casks (brew install --cask name). brew list shows what you've installed.
Common next installs for a developer Mac:
"zsh: command not found: brew" means your shell can't find Homebrew. The installer adds /opt/homebrew/bin to the system PATH for new Terminal windows, and the Next steps lines fix the window you installed from. To fix it:
ls /opt/homebrew/bin/brew. If the file exists, the install worked.brew --version.If /opt/homebrew/bin/brew doesn't exist, or brew is still missing in a new Terminal window, the install most likely didn't finish: run the install command again and read its last lines for the error. If you use bash rather than zsh, add the eval line to ~/.bash_profile.
Homebrew also runs on Linux and on Windows through WSL (Windows Subsystem for Linux), with the same install command. It installs to /home/linuxbrew/.linuxbrew. First install the build tools it needs; on Debian or Ubuntu, including Ubuntu on WSL:
sudo apt-get install build-essential procps curl file gitThen run the install command from brew.sh and add brew to your PATH:
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"Use ~/.zshrc instead of ~/.bashrc if zsh is your login shell. For other distributions, Homebrew's Linux documentation lists the packages to install first.
To uninstall Homebrew, run the official uninstall script from the Homebrew/install repository on GitHub:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"The script asks for confirmation, then removes Homebrew and every package you installed with it. It may list some folders it couldn't remove; delete those yourself if you don't need them. Finally, remove the brew shellenv line from ~/.zprofile.
Homebrew is open source, and its install script is public on GitHub, so you can read it before you run it. The script explains what it will change and pauses for your confirmation before it makes any changes.
The installer adds /opt/homebrew/bin to the system PATH for new Terminal windows, but not for the window you installed from: run the "Next steps" lines the installer printed to fix that one. If brew is still missing in a new Terminal window, the install most likely didn't finish, so run the install command again.
Yes. The official installer supports Apple Silicon Macs only and installs Homebrew to /opt/homebrew. Intel Macs are no longer supported, and the install script stops on them.
No. Homebrew needs only Apple's Command Line Tools for Xcode, a much smaller download than the Xcode app, and the install script installs them for you if they are missing.
Run brew update to update Homebrew itself and its list of packages. Then run brew upgrade to update the packages you've installed.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance