Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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
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

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.