I recently messed up my .bashrc file, which I mentioned in this question: How do I restore .bashrc to its default?, and I can't find a way to restore .bashrc to its default that works.

I can't make commands in the terminal because every time I try I receive an error message along the lines of

The command could not be located because '/usr/bin' is not included in the PATH >environment variable.

On other questions I have seen that some recommendations for this problem involve using default files in /etc/skel/ (Problem in .bashrc ).

This won't work for me, as I looked in /etc/skel/, and realized that I have practically no files at all in there! I don't know why this is.

Also, solutions that involve using the terminal don't seem to work because every time I use the terminal I get the above-mentioned error message.

I'd be really appreciative if anybody could help me solve this problem. I'm somewhat new to Ubuntu, and I'm having difficulties with this issue.

  • Note -- I realized that the files in /etc/skel/ were hidden; I used ctrl + h and they are actually there. I copied the original .bashrc file to my home directory. However, the problem in the terminal still persists.
    – nanananana
    Jan 14, 2014 at 14:31
  • You will need to log out and back in or execute source ~/.bashrc in the terminal Jan 14, 2014 at 14:35

2 Answers 2


Most of the default files in /etc/skel are hidden ('dot') files, so to see them in the GUI file manager you will need to Show hidden files from the menu or use the Ctrl+h key combination.

To see them in a terminal you will need to use ls -a or ls -A i.e.

ls /etc/skel


$ ls -A /etc/skel
.bash_logout  .bashrc  examples.desktop  .profile  .Xdefaults  .xscreensaver

Until you have fixed your path you will need to use the full path to each command e.g. /bin/ls, /bin/cp e.g.

/bin/cp ~/.bashrc ~/.bashrc_old
/bin/cp /etc/skel/.bashrc ~/

For the new .bashrc file to take effect, you will need to start a new shell or log out and back in - or you can source the new file in the shell using

source ~/.bashrc

Usually .bashrc file on /etc/skel/ was hidden.Press ctrl+h to see the hidden .bashrc file.

  • Thank you! I wasn't aware of this, and this info was a big help!
    – nanananana
    Jan 14, 2014 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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