I'm looking for a way to have some environment variables set for every application.
From what I read there are multiple possible files such as ~/.profile
, ~/bash_profile
, ~/.zshenv
etc. But everything I can find seems to be about setting environment variables for the shell (i.e.: when I open a Terminal). Famously macOS changed from having default bash
to default zsh
.
I want to set these environment variables for my whole login, even GUI apps which are not (obviously) associated with any shell session.
I have, of course, tried ~/.profile
but this did not work. On Linux this would have been executed when I login, not just when I open a Terminal. Is there any such similar configuration file on macOS (11.3).
Apologies if this is trivial, I'm very experienced with Linux but very new to macOS.