Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to put new aliases to my .bash_profile 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. – broiyan Dec 11 '12 at 8:39

3 Answers

up vote 6 down vote accepted

It's a hidden file, located in your homefolder:

~/.bash_profile

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

Because it's a hidden file, you have make it visible. In Nautilus, go to the menu View, 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
2  
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 http://mywiki.wooledge.org/DotFiles for an explanation.

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//.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

 
discard

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.