Possible Duplicate:
Reset your PATH variable

Everytime I open Terminal I need to set the PATH using:


Otherwise commands like 'ls' do not work. This is a pain. How do you fix the PATH so that each time you open the Terminal you don't need to set the PATH?

marked as duplicate by bmike Sep 17 '12 at 18:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Aug 29 '12 at 14:12

This question came from our site for professional and enthusiast programmers.

  • 2
    If you need to do this every time, something is broken. – You Aug 28 '12 at 13:00

You can do this by editing the .profile file in your home directory - just add your PATH command into there and it will be executed each time you open a Terminal window.

You can read about some other ways to do this in this question.


One good way is to set your environment variables in /etc/launchd.conf, as shown here. Putting them in launchd.conf makes them accessible in the terminal as well as in any code you may write which uses the environment settings.