Difference between .bashrc and .bash_profile
What's the difference between
.bash_profile, and when do you configure which?
I.e if I configure the
.bash_profile, do I still need to configure
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
There is more detail in the man page that covers POSIX-shell compatibility mode, which is where
If you configure
I like to keep my own aliases and commands in
To use a
.profile is executed by bash when you get a normal shell process -- e.g. you open a terminal tool. .bash_profile is executed by bash for login shells -- so this is when you telnet/ssh into your machine remotely for instance. For instance if you ssh remotely into a machine (let's say you open an X Terminal) you will get initially .bash_profile executed. If in that XTerminal you type "xterm" and spawn another X Terminal, then .profile will be executed for the second instance of XTerminal. The files reside in your home directory (~). If I'm not mistaking by default they both execute ~/.bashrc so you can edit that to configure common settings/variables for both login and non login shells (e.g setting PATH, some aliases/shortcuts etc). You might want occasionally to configure certain things differently for these 2 but I have never encountered that need -- however, the possibility is there.
for the fast and simple config (where you don't want complicate things) simply configure everything in your ~/.profile. Only when you run into some troubles (but probably will never) learn more about the .bash_login or .bash_profile ;)
I'm on OS X too, and never needed .bash_profile or .bash_login and using only .profile, but your mileage may vary...