title: Why am I no more able to change the environment variable $USERNAME on macOS?
body: <p><strong>WHAT I WANT TO DO</strong></p>
  
  <pre><code>$ echo $USERNAME
  myusername
  $ export USERNAME=newvalue
  $ echo $USERNAME
  newvalue
  </code></pre>
  
  <p><strong>WHAT IS HAPPENING</strong></p>
  
  <pre><code>$ echo $USERNAME
  myusername
  $ export USERNAME=newvalue
  $ echo $USERNAME
  myusername
  </code></pre>
  
  <p><strong>WHAT I TRIED</strong></p>
  
  <ul>
  <li>I tried to use: <code>sudo</code> ...;</li>
  <li>I tried to use: <code>unset USERNAME</code>.</li>
  </ul>
  
  <p><strong>USEFUL NOTES</strong></p>
  
  <ul>
  <li><p>OS: macOS Mojave 10.14</p></li>
  <li><p>Direnv: <a href="https://github.com/direnv/direnv" rel="noreferrer">https://github.com/direnv/direnv</a></p></li>
  <li><p>I am using <code>zsh</code></p></li>
  </ul>
  
  <p><strong>WHAT I DID BEFORE THE ISSUE</strong></p>
  
  <p>I was able to change my environment variable several times using <code>direnv</code> (<a href="https://github.com/direnv/direnv" rel="noreferrer">https://github.com/direnv/direnv</a>), and everything was working well. </p>
  
  <p>I was able to set local env variables in <code>.envrc</code>. 
  Then, I encountered this issue...</p>
  
  <hr>
  
  <p><strong>SOLUTION</strong></p>
  
  <p><a href="https://unix.stackexchange.com/questions/483469/cannot-change-the-environment-variable">https://unix.stackexchange.com/questions/483469/cannot-change-the-environment-variable</a></p>