Skip to main content
minor cosmetics
Source Link
don_crissti
  • 85.6k
  • 31
  • 234
  • 262

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 $PATH accordingly.

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/profile and /etc/csh.login which should affect

  • bashbash login shells
  • cshcsh login shells
  • zshzsh login shells (should read /etc/profile/etc/profile)
  • all other shells that source /etc/profile which should be most login shells.

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 $PATH accordingly.

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/profile and /etc/csh.login which should affect

  • bash login shells
  • csh login shells
  • zsh login shells (should read /etc/profile)
  • all other shells that source /etc/profile which should be most login shells.

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 $PATH accordingly.

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/profile and /etc/csh.login which should affect

  • bash login shells
  • csh login shells
  • zsh login shells (should read /etc/profile)
  • all other shells that source /etc/profile which should be most login shells.
Source Link
terdon
  • 252.2k
  • 69
  • 480
  • 718

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 $PATH accordingly.

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/profile and /etc/csh.login which should affect

  • bash login shells
  • csh login shells
  • zsh login shells (should read /etc/profile)
  • all other shells that source /etc/profile which should be most login shells.