Zend certified PHP/Magento developer

macOS equivalent of `~/.pam_environment`

On a linux machine, setting my environment variables in ~/.pam_environment saves me a lot of hassle, especially as I can keep my other dotfiles free of clutter and still get a shell-invariant environment. Is there some way to achieve this on macOS?

  • Since man pam_env gives me an entry in macOS, I thought populating ~/.pam_environment might be possible, but to no effect.
  • I currently have a ~/.env.sh, which I source from .bashrc and .zshrc, but I am hoping for some canonical way to achieve this.