HowTo: Restore Your Default .bashrc File in Ubuntu

If you’ve managed to find yourself deleting, overwriting or generally messing up your profiles .bashrc file there’s a really easy way to fix it. A default version of the file can be found under “/etc/skel/.bashrc”, simply coping that over your profiles one (found in your home directory) will restore it to default. Make sure to also source the file if you want to continue using it under that terminal or close and re-open the terminal.

I managed to have a blank bashrc after upgrading Ubuntu with a separate /home partition, while deleting all the old config files I must have also removed this.

The following commands should do this for you, be sure to make a back up of your current .bashrc file too, just to be safe.

cp ~/.bashrc ~/.bashrc.bkup
cp /etc/skel/.bashrc ~/
source .bashrc

You should be now back to a default terminal experience and continue to customise it how you like!

5 comments to HowTo: Restore Your Default .bashrc File in Ubuntu

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>