Advanced Mac users that utilize the command line may occasionally encounter a “command not found” error message when attempting to run something in the command line.
The “command not found” error in the Terminal can surface for several reasons in the command line of MacOS and Mac OS X, as we’ll discuss here, and of course, we’ll offer solutions to these issues.
The three most common reasons why you may see the “command not found” message in the Mac command line are as follows:
the command you are attempting to run is not installed
the command was deleted, or, worse, the system directory was deleted or modified
the users $PATH is incomplete, or $PATH has been erroneously set, reset, or cleared – this is the most common reason to see a ‘command not found’ message