I am using the z Shell (zsh
) instead of the default bash, and something wrong happen so that all commands who used to work are no longer recognized:
<
You can create a symlink in /usr/local/bin/
sudo ln -s $HOME/.composer/vendor/bin/homestead /usr/local/bin/homestead
I fixed the issue by opening the terminal preference general tab and changing the Command (complete path) to /bin/bash
to default and then editing the ~/.zshrc
file.
export PATH="all your path inside the quotes"
...without any whitespace between the PATH="
and save the file.
After saving the file, change the /bin/zsh
in your command or select default
...and restart terminal and you should have your zsh shell working again!
Best solution work for me for permanent change path
Open Finder-> go to folder /Users/ /usr/local/bin
open .zshrc with TextEdit
.zshrc is hidden file so unhide it by command+shift+. press
delete file content and type
export PATH=~/usr/bin:/bin:/usr/sbin:/sbin:$PATH
and save
now
zsh: command not found Gone
My solution:
Change back to bash
:
source .bashrc
next:
echo $PATH
copy this:
/home/frank/.asdf/shims:/home/frank/....
back to the zsh
:
source .zsh
open .zshrc
:
and paste:
export PATH=/home/frank/.asdf/shims:/home/frank/....
restart terminal