I recently installed Ubuntu 13.10. in the process of editing bash.bashrc file something went wrong and all of a sudden all i'm getting when I open my terminal is a blank screen. No directory names or $. So I can't execute any commands to update, install, fix or anything. All the help out I come across assume I can use the command line. . Anyone knows how to fix this? or how maybe how I can recover the default bashrc file (without using the command line)? Is my only option uninstalling and reinstalling Ubuntu? I don't even know how to do that without the command line.
2 Answers
rajagenupula's answer would do the job... If you could get to a terminal. The problem is your default shell is bash (even in a TTY) so you're going to struggle to run those commands.
To get a working console, I'd press Alt+F2 and run:
xterm -e sh
That should drop you into a nasty super-basic shell. And from there you can fix/rescue/etc your .bashrc
using nano (to edit) or rajagenupula's suggested commands, which should also work (you could skip the source and just go back to your traditional terminal.
If you don't have graphical access, you could drop into recovery mode (using Grub at boot), run mount -o remount,rw /
and then fix/replace the file.
-
I was able to get to that xterm shell following your instructions. I re-editied the bash.bashrc file and saved it. but the terminal is still blank. any idea? thanks. Dec 18, 2013 at 4:19
No Problem , you can restore it easily.
Just press CTRL+ALT+F1 & login there
then paste as
cp /etc/skel/.bashrc ~/
source .bashrc
Then type CTRL+ALT+F7 to reverse to GUI desktop.
-
thanks for replying. I tried CTR+ALT+F1. when I enter my password, nothing happens. where do I past the above commands? when I came back with F7, the terminal still didn't work. I appreciate your help. Dec 17, 2013 at 13:37
-
-
In Ubuntu 17.10 and later press Ctrl+Alt+F3 and login there. The press Ctrl+Alt+F2 to reverse to GUI desktop.– karelOct 6, 2018 at 8:25