shell – commands not found on zsh

shell – commands not found on zsh

Its evident that youve managed to mess up your PATH variable. (Your current PATH doesnt contain any location where common utilities are located.)

Try:

PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH

Alternatively, for resetting zsh, specify the complete path to the shell:

exec /bin/zsh

or

exec /usr/bin/zsh

In your ~/.zsh config file include the path to your bash path file that contains your aliases. In my case it was including the line source ~/.bash_profile inside of ~/.zsh .

shell – commands not found on zsh

  1. Use a good text editor like VS Code and open your .zshrc file (should be in your home directory. if you dont see it, be sure to right-click in the file folder when opening and choose option to show hidden files).

  2. find where it states: export PATH=a-bunch-of-paths-separated-by-colons:

  3. insert this at the end of the line, before the end-quote: :$HOME/.local/bin

And it should work for you.

You can test if this will work first by typing this in your terminal first: export PATH=$HOME/.local/bin:$PATH

If the error disappears after you type this into the terminal and your terminal functions normally, the above solution will work. If it doesnt, youll have to find the folder where your reference error is located (the thing not found), and replace the PATH above with the PATH-TO-THAT-FOLDER.

Leave a Reply

Your email address will not be published.