I was trying to add
JAVA_HOME in the path variable.
I downloaded Java JDK and done following:
added following lines and saved the file:
export JAVA_HOME=$(/usr/libexec/java_home) export PATH=$JAVA_HOME/bin=$PATH
After that I tried to open bash file again using:
-bash: nano: command not found
I tried other commands too such as
java -version etc. All of them shows command not found error.
What is the solution for this? How can I restore my system?
Updated: Solution that I used:
I run the following commands to set the standard default path that Mac OS uses in the command line: