3

Ever since the latest macOS update, I've been using zsh as the default shell. However, all my PATH variables are set up in ~/.bash_profile.

~/.zprofile and ~/.zshenv doesn't exist, and ~/.zshrc has no path variables

My question is: where should I actually put my path variables in the future? Everything seems to work fine (GO Path, Python, Node paths - none of them are in the zsh profile though..)

erikvm
  • 858
  • 10
  • 30
  • You simply *create* `.zprofile`. Just like `bash`, `zsh` only sources the standard files if they exist. – chepner May 06 '20 at 12:52
  • So if I create `.zprofile` with a different path than the one in `bash_profile` - does `.zprofile` override the `bash_profile` one? – erikvm May 06 '20 at 15:11
  • 3
    `zsh` isn't using `bash_profile` *at all*, unless you are sourcing it explicitly (which you shouldn't). It sources `/etc/zprofile` first, which uses `path_helper` to construct an initial `PATH` the same way `/etc/profile` (which was used by `bash`) does. – chepner May 06 '20 at 15:19
  • Does this answer your question? [Is there anything in Zsh like .bash\_profile?](https://stackoverflow.com/questions/23090390/is-there-anything-in-zsh-like-bash-profile) – murf Nov 22 '21 at 12:32

0 Answers0