.bashrc file not found?

Sometimes when you install Ubuntu, the .bashrc file is missing. The problem comes when you want to start using aliases as described in this post. Here is how to fix it.

Make sure that your .bashrc file is missing.

cd ~
ls -al

Check to see if you have a .bashrc file. If you find it well and good. If you do not find the .bashrc file then copy the default file into your home directory:

sudo cp /etc/skel/.bashrc ~/

In the /etc/skel directory .bashrc is owned by root. Therefore after you copy it into your home directory you will have to assign the ownership of the file to yourself.

sudo chown user:group ~/.bashrc

Now you can create a .bash_aliases file in your home directory and start adding your aliases to the file as described in this post.

Did this post help you?
SmartHomeBeginner brings in-depth tutorials easy enough to understand even for beginners. If you are reading this, please consider buying us a coffee (or two) as a token of appreciation.


Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.