0

I am new to linux and I was trying to set up path of JAVA_HOME but I accidentally wrote export PATH=/usr/lib/jvm/java-11-openjdk-amd64 which I think overwrote $PATH.

I am quite sure I have messed up big time. Because when I enter $PATH, it says zsh: no such file or directory: /home/gshacklebolt/.local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Is there any way to revert what I did?

1 Answers1

1

If you want to check the PATH you need to type

echo $PATH

I think the original path should be restored after a reboot. And then to add a new dir to the path

export PATH=$PATH:/add_tour_path_here

Hope this helps you out.