Search code examples
cygwin

Make cygwin home directory to Windows' User Profile


As I am developing Ruby on Rails on a Windows machine, I need to use cygwin to emulate the Unix command prompt. The problem now is that every time when I open the cygwin terminal, I am brought to this directory C:/cygwin/home/my_user_name instead of the Windows' default user directory C:/Users/my_user_name.

Does anyone know how to make cygwin's default home directory to Windows default C:/Users/my_user_name directory?

I have skimmed through the various solutions provide in Stack Overflow, but none of them works for me, the "mkpasswd" doesn't work either. Does this have something to do with my operating system's version, or maybe something else?

I am using cygwin 1.7.5 and my operating system is Windows 7 Business 64 bit.


Solution

  • mount -f "$USERPROFILE" ~
    mount -m > /etc/fstab
    

    Related

    Safely change home directory