How to Fix “Command Not Found” in Command Line

Chances are that you might be getting the following error on your Mac, when you have been trying to run commands in the terminal and you have already installed the commands

zsh: command not found: git

or

zsh: command not found: curl

The fix is in the answer below

1

1 Answer

Chances are that something might have gone wrong with the users $PATH on your machine or maybe the actual path where the command is has not been set.

You can just run the command below, this should fix you issue:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

and if you feel like checking the path you can just run :

echo $PATH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest