redconservatory
redconservatory

Reputation: 21924

Difference between .profile and .bash_profile on Snow Leopard

I am going to set the path for mySQl on my computer (I'm running Snow Leopard) but I see different instructions online.

Some say to change the .profile file and some say to change the .bash_profile file. What is the difference?

Upvotes: 68

Views: 34404

Answers (2)

hlim
hlim

Reputation: 945

I believe mac OS X environment checks .bash_profile, .bash_login, .profile in this order. It will run whichever is the highest in the hierarchy, so, if you have .bash_profile, it will not check .profile.

Upvotes: 50

Paul R
Paul R

Reputation: 212929

.profile works with sh or bash. However .bash_profile is bash-specific and will override .profile if present.

Upvotes: 89

Related Questions