Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I use ls -a command to see the .bash_profile, but there isn't such a file.

share|improve this question
You should use ~/.profile instead. – muru Aug 13 '14 at 10:16
possible duplicate of I can't find .bash_profile – Alaa Ali Aug 13 '14 at 10:21
It's pretty common that some configuration file (or even directories) are missing. In that case the software that should read them will use a default configuration and/or read other sources to retrieve the configuration. If you want to modify a configuration file that doesn't exist simply create it first. – Bakuriu Aug 13 '14 at 11:33
up vote 19 down vote accepted

Ubuntu uses ~/.profile .

you can create your .bash_profile in Ubuntu but then .profile will not be read.

If we read .profile content :

cat ~/.profile


# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.

So use ~/.profile instead of ~/.bash_profile

share|improve this answer

That means the file does not exist. But, you can create the file and bash executes/sources the file if bash is invoked as a login shell. So evertime you login via a shell (for example via ssh).

If you want the content to execute everytime you open a terminal, then you should modify the .bashrc file instead.

share|improve this answer
can you get some idea about why .bash_profile file is missing ? – Roledenez Aug 13 '14 at 10:18
You can copy it from /etc/skel/ directory. – Frantique Aug 13 '14 at 10:19
It's a design desicion of canonical. But, that does not mean cannot do it. – chaos Aug 13 '14 at 10:25

If you mean the .bashrc you will find it in your home folder. If it isn't there, you can copy it from the /etc/skel folder to your home folder.

If you need some more information on this subject, please visit stefaan lippens page.

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.