What's the difference between .profile and .bash_profile, and when do you configure which? (Mac)

53,706

Solution 1

If you configure .bash_profile, you won't also need to configure .profile.

I like to keep my own aliases and commands in .profile so that if I mess up anything, I know that I can always delete the .profile without affecting the system at large or other applications that modify .bash_profile (like MacPorts).

To use a .profile, you may need to include the line source ~/.profile in your .bash_profile so that the .profile file is read (see Ned Deily's answer).

Solution 2

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

Share:
53,706

Related videos on Youtube

Imran
Author by

Imran

Web developer

Updated on September 18, 2022

Comments

  • Imran
    Imran over 1 year

    Possible Duplicate:
    Difference between .bashrc and .bash_profile

    What's the difference between .profile and .bash_profile, and when do you configure which?

    I.e if I configure the .bash_profile, do I still need to configure .profile?