Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

  <https://help.ubuntu.com/community/EncryptedPrivateDirectory#Recovering%20Your%20Data%20Manually>

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
2  
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: docs.google.com/document/d/… –  jrpharis Oct 19 '13 at 2:42
    
Could you upload it to paste.ubuntu.com? –  Braiam Oct 19 '13 at 2:45
    
Here it is: paste.ubuntu.com/6264122 Sorry, I am knew to this forum. Thanks for the help –  jrpharis Oct 19 '13 at 14:37

2 Answers 2

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

 
discard

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.