How to resolve 'zsh: command not found' error on Apple M processor?

Hello community,

Whenever I enter a command on the terminal I get the message "zsh: command not found: [command name]"

I am running 26.0.1 on a M processor.


Does anyone have a clue on how to fix this?




[Re-Titled by Moderator]

Original Title: zsh: command not found:

MacBook Pro 14″, macOS 26.0

Posted on Nov 19, 2025 7:52 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 19, 2025 8:10 PM

Update to macOS 26.1.


In general, either Homebrew is not installed, or the Homebrew installation has not been completed and the necessary Homebrew directories have not been added into your path. Probably something related to the latter.


The contents of the environment variable PATH is an ordered list of places to look for commands you enter, with zsh and most other shells separating each of those places with colons.


zsh can read from various scripts at login. Those scripts are ~/.zprofile , ~/.zshenv, ~/.zshr, and ~/.zlogin, and ~/.zlogout.


You can cat each of those script files, if present. You can edit with nano, if you want to alter the file.


And to add your own stuff to the path in zsh, use (lowercase) path as follows to prepend or append the directory:


path+=('/path/to/wherever')
path=('/path/to/wherever' $path )


This same sort of path change is what Homebrew is doing during their installation and setup, though I don’t know which script the Homebrew folks use for the path.


Looking at the Homebrew docs, this is probably the step that was missed:



Details: https://docs.brew.sh/Installation


4 replies
Question marked as Top-ranking reply

Nov 19, 2025 8:10 PM in response to Its_me_jj

Update to macOS 26.1.


In general, either Homebrew is not installed, or the Homebrew installation has not been completed and the necessary Homebrew directories have not been added into your path. Probably something related to the latter.


The contents of the environment variable PATH is an ordered list of places to look for commands you enter, with zsh and most other shells separating each of those places with colons.


zsh can read from various scripts at login. Those scripts are ~/.zprofile , ~/.zshenv, ~/.zshr, and ~/.zlogin, and ~/.zlogout.


You can cat each of those script files, if present. You can edit with nano, if you want to alter the file.


And to add your own stuff to the path in zsh, use (lowercase) path as follows to prepend or append the directory:


path+=('/path/to/wherever')
path=('/path/to/wherever' $path )


This same sort of path change is what Homebrew is doing during their installation and setup, though I don’t know which script the Homebrew folks use for the path.


Looking at the Homebrew docs, this is probably the step that was missed:



Details: https://docs.brew.sh/Installation


Nov 20, 2025 4:45 AM in response to Its_me_jj

If you installed homebrew on an M-architecture Mac, the command line brew will be installed in /opt/homebrew/bin/brew. Simple enough to check:

which -a brew


and if it is installed at the above path, then your Zsh error message indicates that it cannot find brew and that you have not added that brew path to your Zsh shell PATH export statement in the ~/.zshrc file.



Nov 20, 2025 1:13 AM in response to Its_me_jj

Rather obviously, I would say, brew is not installed.


Some context would be nice, and would allow us to better assist you.


It is rather dangerous to follow some instructions for installing stuff at the Terminal if you are unsure of what you are doing. The instructions for installing homebrew are available online, but perhaps it would be better for you to tell us what you are trying to achieve.

Maybe you can achieve it without having to install third party low level stuff that may work, but may also cause other issues.





How to resolve 'zsh: command not found' error on Apple M processor?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.