Setting the home directory in Cygwin

The default user home directory in Cygwin is /home/user however a much more logical home is the actual home that is the same as the Windows home: C:\Users\user

The way to change the home directory users is simple:

edit /etc/nssswitch.conf and change the following line:

# db_home: /home/%U

– to –

db_home: /%H

Make sure to delete the hash mark at the beginning of the line.

Reference: Cygwin user names, home dirs, login shells: The db_home: setting”