title: What does sudo -H do?
body: <p>After trying to install virtualenv with pip</p>
  
  <pre><code>$ pip install virtualenv
  </code></pre>
  
  <p>I got a permission denied error</p>
  
  <pre><code>IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'
  </code></pre>
  
  <p>So I used sudo to install virtualenv</p>
  
  <pre><code>$ sudo pip install virtualenv
  </code></pre>
  
  <p>But then a warning showed up:</p>
  
  <blockquote>
    <p>The directory '/Users/petertao/Library/Caches/pip/http' or its parent
    directory is not owned by the current user and the cache has been
    disabled. Please check the permissions and owner of that directory. If
    executing pip with sudo, you may want sudo's -H flag.</p>
    
    <p>The directory '/Users/petertao/Library/Caches/pip' or its parent
    directory is not owned by the current user and caching wheels has been
    disabled. check the permissions and owner of that directory. If
    executing pip with sudo, you may want sudo's -H flag.</p>
  </blockquote>
  
  <p><strong>What does sudo's -H flag do?</strong></p>