Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.cygwin.com/cygwin-ug-net/ov-new.html#ov-new1.7.34" rel="noreferrer">Starting with Cygwin 1.7.34</a>, the recommended way to do this is to add a custom <code>db_home</code> setting to <code>/etc/nsswitch.conf</code>. A common wish when doing this is to make your Cygwin home directory equal to your Windows user profile directory. This setting will do that:</p> <pre><code>db_home: windows </code></pre> <p>Or, equivalently:</p> <pre><code>db_home: /%H </code></pre> <p>You need to use the latter form if you want some variation on this scheme, such as to segregate your Cygwin home files into a <em>subdirectory</em> of your Windows user profile directory:</p> <pre><code>db_home: /%H/cygwin </code></pre> <p>There are several other alternative schemes for the <code>windows</code> option plus several other <code>%</code> tokens you can use instead of <code>%H</code> or in addition to it. See <a href="https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-syntax" rel="noreferrer">the <code>nsswitch.conf</code> syntax description</a> in the <a href="https://cygwin.com/cygwin-ug-net/cygwin-ug-net.html" rel="noreferrer">Cygwin User Guide</a> for details.</p> <p>If you installed Cygwin prior to 1.7.34 or have run its <a href="https://cygwin.com/cygwin-ug-net/using-utils.html#mkpasswd" rel="noreferrer"><code>mkpasswd</code> utility</a> so that you have an <code>/etc/passwd</code> file, you can change your Cygwin home directory by editing your user's entry in that file. Your home directory is the second-to-last element on your user's line in <code>/etc/passwd</code>.¹</p> <p>Whichever way you do it, this causes the <code>HOME</code> environment variable to be set during shell startup.²</p> <p>See <a href="http://www.cygwin.com/faq.html#faq.setup.home" rel="noreferrer">this FAQ item</a> for more on the topic.</p> <hr> <p><strong>Footnotes:</strong></p> <ol> <li><p>Consider moving <code>/etc/passwd</code> and <code>/etc/group</code> out of the way in order to use <a href="http://www.cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping" rel="noreferrer">the new SAM/AD-based mechanism</a> instead.</p></li> <li><p>While it is possible to simply set <code>%HOME%</code> via the Control Panel, it is <a href="https://cygwin.com/ml/cygwin/2015-02/msg00455.html" rel="noreferrer">officially discouraged</a>. Not only does it unceremoniously override the above mechanisms, it doesn't always work, such as when running shell scripts via <code>cron</code>.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload