Bash configuration on Mac OS X 10.4+

When configuring the bash on OSX via ~/.profile it seems to completely ignore it as soon as ~/.bash_profile exists. If this is correct and expected behavior, should I add my extra configuration stuff to ~/.bash_profile as well or use it instead of ~/.profile?

Thanks in advance.

Answers


It's expected behaviour. See here

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

So only the first readable one counts.

As for which you should use, it's up to you - unless there are corporate policies or something else that creates a specific one, or relies on a specific one existing.


It would be "source ~/.profile"


Need Your Help

Terms of Service and caching

google-maps

I'm working on an app that will be used in public transit vehicles as an advertising system. This is part of a university research project that brings high speed wifi to vehicles. I have a Google Map

Android 3 Spinners

android

First of I'm a novice. I've been through the example of how to create a spinner, and I've searched this site and the Internet for how to create multiple spinners with the list in the 2nd spinner be...