Difference between .profile and .bash_profile on Snow Leopard

MacosTerminal.Bash Profile

Macos Problem Overview


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?

Macos Solutions


Solution 1 - Macos

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

Solution 2 - Macos

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionredconservatoryView Question on Stackoverflow
Solution 1 - MacosPaul RView Answer on Stackoverflow
Solution 2 - MacoshlimView Answer on Stackoverflow