From what I have gleaned in various places with discussions about /usr/libexec/path_helper
and all, apparently the modern way to add items to the environment variable PATH
in macOS Sierra 10.12 is to either:
- Edit the
/etc/paths
file - Add file(s) to be read from the
/etc/paths.d
directory.
My Questions:
- Which is more kosher on modern macOS?
- If the better or more common way is dropping files into the
paths.d
directory, what should be the names and content of those files? Any examples? - I am using
zsh
rather thanbash
. Does that make a difference? - Are these two options unique to macOS? Or do they appear in BSD or other Unix-like systems?