Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I type env at the terminal prompt, I get a dump of all the environment variables. When I check / or ~, however, I do not see a .profile, .bash_login or .bash_profile.

Where is this being stored in Mac OS X 10.6.7 ?



share|improve this question
up vote 7 down vote accepted

It sounds like you are using bash.

bash first runs /etc/profile. /etc/profile (on Mac OS X 10.6.7) runs path_helper(8) which is where your default paths get set. After that it runs /etc/bashrc which doesn't do much. Once the default configuration is set, it moves on to the user login scripts.

bash looks in your home directory for .bash_profile, .bash_login, and .profile in that order. bash will run the first of these that it finds and stop looking.

share|improve this answer
Also, some variables come from launchd (e.g. TMPDIR, SHELL, HOME, USER, LOGNAME, SSH_AUTH_SOCK, DISPLAY, Apple_PubSub_Socket_Render), Terminal (e.g. TERM, TERM_PROGRAM, TERM_PROGRAM_VERSION, COMMAND_MODE) and bash itself (PWD, SHLVL). – Chris Johnsen May 24 '11 at 5:36
Thanks Chris! Out of curiosity - why are some of the variables associated with launchd ? The other ones make sense to me. – Scott Davies May 30 '11 at 7:38

Usually those files should reside in your /etc directory. In case when you don't have your local copy of say .profile then the system uses /etc/profile .

share|improve this answer
Thanks Tigran! That was interesting - I had searched for .profile, but I see that it is profile, as you have noted. – Scott Davies May 30 '11 at 7:40

Have a look at the following links. Some of them may help. ;)

share|improve this answer
Thanks! Unfortunately, the .plist file is not found on my system. Any reason that you can think of ? I'm running 10.6.7. – Scott Davies May 23 '11 at 11:35
Please explain something in the text and give information what the links are - as I assume blank links etc are to virus, phishing etc – Mark May 23 '11 at 11:42
@Mark - A good point. In this case, the links are safe. – Scott Davies May 30 '11 at 7:41
When the comment was written - the text just read link not the URI as it is now – Mark May 30 '11 at 10:36
Well, after @Marks comment I have edited the links to make it more transparent. – karmatic May 30 '11 at 13:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.