How to change HOME directory and start directory on MSYS2?
If you would like to use your windows home folder as the home folder for MSYS2, you can edit /etc/nsswitch.conf and write:
db_home: windows
Msys2 will use windows %HOME% as it's $HOME dir. If you set %HOME% in environment variables (to the windows directory you need Msys2 to use) it will work.
I prefer to just update /etc/fstab
@ fstab.
# cat /etc/fstab
# For a description of the file format, see the Users Guide
# https://cygwin.com/cygwin-ug-net/using.html#mount-table
# DO NOT REMOVE NEXT LINE. It remove cygdrive prefix from path
none / cygdrive binary,posix=0,noacl,user 0 0
##################################################################
# Canonicalize the two home directories by mounting the windows #
# user home with the same path mapping as unix. #
##################################################################
none /c/Users/Edward /home/Edward binary,posix=0,noacl,user 0 0