All commands are invalid on the terminal

zsh: command not found: ls
?? ~ dir
zsh: command not found: dir
?? ~ cat .zshrc
zsh: command not found: cat
?? ~ vi .zshrc
zsh: command not found: vi
?? ~ open
zsh: command not found: open
Copy the code

The solution

  • Methods a

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

  • Method 2

exec /bin/zsh

  • Methods three

exec /usr/bin/zsh

Choose one of the three can be solved, remember to like attention oh!