/etc/profile vs /etc/paths.d

Hello,

I work with a Mac that was upgraded from Tiger to Leopard, and with another with a clean Leopard install. When trying to change the system search path in the one with the clean install, I noticed that /etc/profile is read-only and does not have any PATH entry in it.

After some googling, I came across some postings whereby file /etc/paths and directory /etc/paths.d are described as the places where search path action takes place now. Is that so?

However, the upgraded mac still has my old Tiger /etc/profile, which seems to work. Does bash merge profile and path.d stuff? Is the first overwriting the second?

For things one adds to the PATH, is it preferable to use /etc/paths or add one-line files to /etc/paths.d?

Consequently, is MANPATH now defined in /etc/manpaths and /etc/manpaths.d? Regarding this, I read some reports about conflicts between Tiger and Leopard man pages. Is that the case?

Finally, does anybody know where important UNIX stuff like this is explained at the Apple website?

Thanks very much for your help,

MarceloC

MacBook Pro, Mac OS X (10.5.1)

Posted on Dec 20, 2007 11:28 PM

Reply
3 replies

Dec 28, 2007 2:42 PM in response to MarceloC

Marcelo-

Have a look at /usr/libexec/path_helper
It loads the contents of the file /etc/paths then the contents of each in /etc/paths.d as part of /etc/profile, the system-wide sh startup.

My suggestion is that you shouldn't edit /etc/paths but rather add appropriate files for whatever you might need into /etc/paths.d -presuming that you want them to be available to all users on the machine-. Otherwise, just set them up in your own .profile.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

/etc/profile vs /etc/paths.d

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.