04-How to set PATH environment variable
by Gand — last modified 2004-06-01 10:44 PM
Create and edit .profile and .bashrc files using Terminal
Watch video
As Panther default shell is bash or if you are using sh or zsh:
Launch Terminal.
You'll find it in /Applications/Utilities
.profile
- At the terminal prompt, to open the text editor pico and create a file named .profile,
execute the following command typing (or copy/paste):
pico .profile
- Press Return, when the text editor open, type (or copy/paste):
source /sw/bin/init.sh
at the end of the line press Return once.
- Then press Control-O, Return, and Control-X
to save the file and return to the prompt.
.bashrc
- Create a file named .bashrc typing (or copy/paste):
pico .bashrc
- Press Return, when the text editor open, type (or copy/paste):
[[ -z $DISPLAY ]] && export DISPLAY=":0.0"
. /sw/bin/init.sh
at the end of the line press Return once.
- Then press Control-O, Return, and Control-X
to save the file and return to the prompt.






