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.

Possible Duplicate:
How do I reset the $PATH variable on Mac OS X?

When I open terminal and type the ls command, it says:

command not found.

I found a link that resolves the problem, but only temporarily. When I exit the terminal and then re-login I have to follow this procedure again.

Is there a permanent solution to my problem?

share|improve this question

migrated from stackoverflow.com Sep 21 '12 at 10:49

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

marked as duplicate by slhck Sep 21 '12 at 12:06

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.

1 Answer 1

Check ~/.profile and ~/.MacOSX/environment.plist to make sure you haven't replaced $PATH by accident. Any lines that set PATH should also add the old $PATH at either the beginning or the end.

share|improve this answer
Hi nneonneo, How can I open ~/.MacOSX/environment.plist file. I may able to open .profile file with the following command open -e .profile –  user1685943 Sep 21 '12 at 5:12
If it doesn't exist, then it won't affect you. –  nneonneo Sep 21 '12 at 5:14
ok thanks a lot nneonneo –  user1685943 Sep 21 '12 at 6:00