code2care@mac bin % brew
zsh: command not found: brew
code2care@mac bin %
If you get brew command not found error when you run a brew command on zsh (or any other shell like bash) on macOS Terminal, there could be few reasons, 1) you many have not installed brew - if so please follow this article - Installing Brew, 2) you many not have set the PATH for brew,

Brew command not found fix
Adding brew to PATH variable:
- Open Terminal,
- Go to /opt/homebrew/bin/ (if you do not find this path - brew is not installed - Article - Installing Brew),
- Run: export PATH=$PATH:/opt/homebrew/bin,
- Try running the brew version command to validate,
code2care@mac % brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision f1b2a2; last commit 2021-02-10)
code2care@mac / % brew help
Example usage:
brew search [TEXT|/REGEX/]
brew info [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA
Contributing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
Comments:
- I was trying to install brew on my new Macbook and got stuck on this, thanks!!! worked like a charm!
Mike J: 02 Jan 2222 14:01:28 GMT
- Further comments disabled!
More Posts related to MacOS,
- How to connect AirPods to Mac
- Display Safari URL address link on hover
- Mac turn dark mode on or off using terminal command
- Docker Desktop needs privileged access macOS
- How to install Java on macOS [Big Sur]
- How to start/boot macOS in safe mode - Big Sur 11.0, Catalina 10.15, or Mojave 10.14
- Find Mac version using terminal command
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to change default macOS Terminal Window size
- How to make EditText text to uppercase or lowercase on macOS
- Disable Startup Sound on macOS
- How to switch from bash to zsh shell in macOS Terminal
- How to make macOS Terminal window Transparent (or Opaque)
- Remove Now Playing icon from macOS Big Sur Menu Bar
- Test internet speed using macOS Terminal command
- How to change macOS Safari default language
- Encode or Decode Base64 String using Mac Terminal Command
- Safari - Get HTTP Request Response Headers
- How to open terminal on Mac to run commands
- How to install homebrew (brew) on M1 Mac
- How to display directory tree in Mac Terminal
- How to Change Mouse Wheel Scroll Direction on Mac
- MacoOS - xyz is an app downloaded from the internet. Are you sure you want to open it? Alert
- The default interactive shell is now zsh. [macOS]
- Change Terminal Cursor Type in Mac (MacOS Shell)
More Posts:
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml - SharePoint
- What does -Xms and -Xmx stands for in Java? - Java
- Android Studio Native typeface cannot be made error - Android
- How to stop or quit cat command? - HowTos
- Facebook : Warning: Request without access token missing application ID or client token - Facebook
- PHP 301 Redirect Permanently - PHP
- What is BTS? What is BTS A.R.M.Y? What is its meaning? - BTS
- Convert String to int in Java - Java