4

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 2

3

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.

1
  • 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.
    – Wally Ali
    Dec 18, 2013 at 4:19
2

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.

3
  • 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.
    – Wally Ali
    Dec 17, 2013 at 13:37
  • In my case the second command was source ~/.bashrc Aug 10, 2018 at 23:23
  • In Ubuntu 17.10 and later press Ctrl+Alt+F3 and login there. The press Ctrl+Alt+F2 to reverse to GUI desktop.
    – karel
    Oct 6, 2018 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .