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:
<         
        
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