How to set environment variable permanently on macOS Catalina? I am trying to set two environment variables on macOS version 10.15.5, I've opened a terminal and tried:
vi ~/.bash_profile

Added the exports to that, saved and exited vi, closed and reopened terminal, I don't see my new exports.
I've also tried:
vi ~/.profile

Added the exports to that, saved and exited vi, closed and reopened terminal, I don't see the exports there either.
What haven't I done?
Sorted, vi ~/.zshenv.
Added the exports, save and exit, restart terminal, my system was using the zsh terminal.
Or without restarting the terminal, just add:
source ~/.zshenv or source ~/.profile
After editing.