- Follow best practice by setting your environment variables so that they are available to both interactive and non-interactive shells. In practical terms, for most people this means setting them in
~/.profile
,~/.bash_profile
,~/.zshenv
instead of~/.bashrc
and~/.zshrc
.