How to Fix Homebrew Command Not Found After Installing It on macOS Without Pretending the Shell Will Discover It by Telepathy
A practical guide to fixing Homebrew command not found on macOS by adding the correct shell initialization, checking Apple Silicon versus Intel install paths, and verifying that the current terminal session actually loaded the brew environment.
Why this issue is embarrassingly common: Homebrew often installs correctly. The shell just never got told where to find it.
Typical failure:
brew: command not foundStep 1: know the likely install path
On Apple Silicon Macs, Homebrew usually lives at:
/opt/homebrew/bin/brewOn Intel Macs, it is often:
/usr/local/bin/brewTest both:
ls /opt/homebrew/bin/brew
ls /usr/local/bin/brewStep 2: initialize the shell correctly
If Apple Silicon:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"If Intel:
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"Step 3: reload and verify
source ~/.zprofile
which brew
brew --versionIf which brew still returns nothing, your shell config file may not be the one this terminal session loads.
Step 4: inspect PATH
echo $PATHYou should see either /opt/homebrew/bin or /usr/local/bin in the path depending on your machine.
Bottom line
When brew is not found after installation, it is usually a shell initialization problem, not a failed Homebrew install. Put the right brew shellenv line in the right profile and verify the active PATH.