title: Mac OS X Mojave - set environment variable permanently
body: <p>I am using mac os mojave (10.14.3). I set the environment variable in both
  <strong><code>~/.bash_profile</code></strong> and <strong><code>~/.bashrc</code></strong> and I ran both <code>~/.bash_profile</code> and <code>~/.bashrc</code>. Then in the same terminal I can see the values which I set (using <code>printenv</code>), but if I open a new terminal then I can not see previously set env variable.</p>
  <p>Please give some suggestions.</p>
  <h2>Update</h2>
  <p>In mac os Bigsur(11.2.3), the default terminal was zsh ( I did not check for other versions) and setting envs in <code>~/.zshenv</code> as in</p>
  <pre><code>echo 'export PATH=$PATH:$PATH:~/Library/Android/sdk/build-tools/29.0/' &gt;&gt; ~/.zshenv
  </code></pre>
  <p>and running <code>. ~/.zshenv</code> helped me saving the envs permanently</p>