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.

I use mercurial and I need to run the command line below each time I open Terminal.

export PATH="/usr/local/bin:$PATH"

Is there any way to add this command line to Terminal start-up? So I don't have to run this command each time manually...

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Such a command can be added to your .profile (a text file) in your home folder. The .profile (and .bash_profile if you use bash) file is run every time you start a new session in Terminal.

Just copy and paste that line into your favourite plain text editor (eg. TextMate, BBEdit, etc.) and save it as .profile (NO .txt EXTENSION) in your home folder. Alternatively you can use the command line integration eg. mate ~/.profile to make it easier to save.

share|improve this answer
add comment

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.