Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is somewhat of a noob question but I'm having problems adding to my path and can't remember how I got changes working the last time I did it.

So I'm using the command "export PATH=$PATH:/Users/evanmcdonnal/go/bin" to modify my path. Then I use echo $PATH and it displays my previous path with the above appended. The problem is, when I quit the terminal and open it again the changes are gone. Is there something I'm missing here that is necessary for it to make the changes permanent? I tried editing the paths file in etc directly but the OS won't let me without root privileges and it seems like a bit of a hassle to obtain those.

share|improve this question

1 Answer 1

You need to add this line to the file .bash_profile in your home directory to have this modification of PATH apply to all Terminal/bash sessions.

share|improve this answer
1  
.bash_profile does not exist on my system. Neither does .profile Should I create it? If so what is the syntax for specifying the path? –  evanmcdonnal Feb 15 '12 at 7:22
2  
Create it if it doesn't exist. The syntax is identical to what you run on the command line, as it just gets executed upon start of a login shell session. –  Daniel Beck Feb 15 '12 at 7:32

Your Answer

 
discard

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.