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 want to put new aliases to my .bash_profile file, but I cannot find this file.
Where is it supposed to be?

share|improve this question
The title should probably read .bash_profile with the dot. – H2ONaCl Dec 11 '12 at 8:39
up vote 21 down vote accepted

It's a hidden file, located in your home folder:


(the ~ expands to your home directory. If your username is user, the result would be: /home/user/.bash_profile).

Since it's an hidden file, you have to make it visible. To do it in Nautilus go to the "View" menu and check "Show hidden files" (or press the shortcut Ctrl + H).

If you are using Kubuntu with Dolphin, you have to press Ctrl + . to toggle the visibility of files.

share|improve this answer
The Keys Ctrl-H toggles the show/hide hidden files also. – Ice Mar 6 '11 at 17:15
sweet didn't know about that ctrl+H – schwiz Mar 6 '11 at 23:58

~/.bash_profile is not the right place to put aliases and functions. They should go in ~/.bashrc. See for an explanation.

share|improve this answer

It is handy to put all your alias in ~/.bash_aliases in the user home directory. That is what is suggested in the ~/.bashrc file in the comments.

share|improve this answer

just wanted to chime in - that even files are hidden in viewer you can still open all of them if you just enter name of the file. For example, if you write in dolphin address bar /home/<user>/.bashrc it will open the file with default editor without toggling show/hide some files.

Other way is to just open your favorite editor and just type in the name of file.

I see that as most preferred way to handle hidden files as showing not showing just add to noise that can be avoided.

And aliases should go into .bashrc as geirha wrote.

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.