/etc/paths read by every shell that I run in OS X? For example, if I use zsh, will it parse
/etc/path to populate
What exactly is the sequence that OS X follows to populate
$PATH? Does it do it differently than other Unices?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The OSX devs have implemented their own way of setting up the $PATH which is different from all other Unices as far as I know. They use a program called
path_helper which will read
/etc/paths and the files in
/etc/path.d and modify the user's default
According to this, the
$PATH is only set this way for login shells. This is probably why iTerminal starts login shells by default (I've always wondered why they chose that).
According to the same source,
path_helper is run from
/etc/csh.login which should affect
zshlogin shells (should read
/etc/profilewhich should be most login shells.