Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 16GB flash drive I have setup to run Ubuntu 12.04 from. While using it, I accidentally deleted .bashrc, and rebooted the system not realizing the file was gone. Now Ubuntu just hangs on the load.

I have setup another flash drive with 13.10, in an attempt to mount the 12.04 flash drive and add the .bashrc file back in. When I mount the drive, my HOME directory where .bashrc would live, is not there. I did some research and found that most likely the directories are encrypted, and ran through the "Recovering your data automatically" step of this post:


But after running sudo ecryptfs-recover-private /media/usb successfully, nothing changed in the mounted drive. How can I get to my HOME directory to add the .bashrc file back in so I can boot this drive again?

share|improve this question
The .bashrc file is generated automatically each time you log in. There isn't a reason why your session should hang. Please, when you boot switch to a TTY (press Ctrl+Alt+F2) then copy the contents of ~/.xsession-errors and paste them here. – Braiam Oct 18 '13 at 15:03
Thanks, the output is here:… – jrpharis Oct 19 '13 at 2:42
Could you upload it to – Braiam Oct 19 '13 at 2:45
Here it is: Sorry, I am knew to this forum. Thanks for the help – jrpharis Oct 19 '13 at 14:37

As far as I know, deleting .bashrc would not do that to your installation, it looks quite irrelevant; from this answer on superuser,

When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.

so unless you are somehow opening a terminal on startup, you don't have to worry about your .bashrc, look for other problems with your installation.

share|improve this answer

Every Ubuntu OS will have some default configuration files in /etc/skel directory.

jai@frank-Jai:~$ sudo ls -a /etc/skel
.  ..  .bash_logout  .bashrc  examples.desktop  .profile  .Xdefaults  .xscreensaver

so if you would like to restore the default .bashrc file in your Ubuntu then simply copy it to your home directory,

cp /etc/skel/.bashrc ~/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.