Ask Different is a question and answer site for power users of Apple hardware and software. 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

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?

share|improve this question

migrated from Aug 29 '12 at 14:12

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

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

This question was marked as an exact duplicate of an existing question.

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.

share|improve this answer

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.

share|improve this answer