Mac command not found solution

MacBook Air command not found. This may have been caused by modifying the Profile when configuring Java Path.
: ls CD, vim, sudo, man command not found

1. First, enter commands so that you can use commands such as Vim temporarily

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

Then open ~/.bash_profile

vim ~/.bash_profile

2. Add PATH

export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:${JAVA_HOME}:${JAVA_HOME}/bin"

3. Restart Profile

source ~/.bash_profile

Exit Terminal, open it again, and type Vim to see if it works

Read More: