2

Possible Duplicate:
What are PATH and other environment variables, and how can I set or use them?

I'm currently trying out Homebrew and it has told me to list it's folder before the default installation path in the .profile.

After some googling it appears that I have to make this file myself as it is not generated. But I have no idea what a file like this looks like and I struggle finding any examples through the normal channels i.e Google.

Could you guys be of assistance?

2 Answers2

0

On OS X there are several locations where you can define $PATH. One is ~/.bash_profile (Terminal.app starts the shell as a login shell on OS X, so it has to be .bash_profile instead of .bashrc). This affects only bash. The other is ~/.MacOSX/environment.plist which can be edited either with the plist editor (if you have XCode installed) or the defaults command. This affects all GUI applications.

However, according to this article environment.plist doesn't work in Mountain Lion anymore and you have to add a line setenv PATH /bin:/usr/bin:... to /etc/launchd.conf instead.

-1

Found this:

export PATH=$PATH:/opt/local/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib

alias sl='ls'
alias pwd='echo -n `pwd` | pbcopy'

From https://stackoverflow.com/questions/5509587/unix-making-change-to-profile-file