Linux wrong path exported. How to recover ~./bashrc file

Put something like:

PATH=/your/jdk/bin/path:${PATH}
export PATH

That way, your path gets prepended to the regular PATH environment.

And simply log out and log back in to reset your environment.
Or type this:

export PATH=/usr/bin:/usr/local/bin

or this

. /etc/profile

to reload a basic environment if you can’t get an editor to work right now.

Leave a Comment