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 just found out I can edit my PATH by editing /etc/paths or /private/etc/paths, or by putting export PATH=$PATH:/a/path in ~/.profile or one of my other startup scrips.

Is there a difference between these methods? If so, is one method preferable to another?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

One is system wide while the other is user-specific. If you want other users on your system to have some entries in their PATH, put them in the system wide configuration file. That's the difference.

The private folder is mentioned here.

share|improve this answer
    
Additionally, .profile only affects commands invoked via the command shell; /etc/paths has the potential to affect many more applications, some of which may be system utilities which rely upon the specific versions of programs in /etc/paths. –  rholmes May 16 at 22:35

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.