1

While trying to set Java home, following someone's instructions I edited ~/.bashrc in gedit, putting the java_home script at the end of the file, and then I typed source ~/.bashrc after saving in gedit.

I returned to gnome terminal and now I absolutely cannot get out of bash.

Zanna
  • 72,312

1 Answers1

3

I'm not sure what you put in your .bashrc but I suspect it is sourcing itself recursively. To reset it to the default, use a GUI method, since you can't use the command line.

The most reliable way would be just to overwrite your broken .bashrc with the system default version.

  • Open Nautilus (the file browser)
  • under View click Show hidden files.
  • Rename your .bashrc to something else like bashrcbroken.
  • Navigate to the directory etc in filesystem
  • go into the etc directory and then go into the skel directory.
  • Right click & copy the file .bashrc.
  • Go back to your user home directory and paste the file there, replacing the old .bashrc file.

Open a new terminal.

Zanna
  • 72,312