title: How do I find the path to the home directory for Linux?
body: <p>I need the path contained in <code>$HOME</code>, the path to the home directory. The function <a href="https://doc.rust-lang.org/std/env/fn.home_dir.html" rel="noreferrer"><code>home_dir</code></a> seems to do exactly that but is deprecated. What should I use in its place?</p>
  <p>The documentation says this :</p>
  <blockquote>
  <p>Deprecated since 1.29.0:
  This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.</p>
  </blockquote>
  <p>What type of crate should I use instead? Is there really no alternative in standard Rust?</p>