When Cygwin was originally started, PWD displays:
C:\Documents and Settings\[email protected] ~
$ pwd
C:\Documents and Settings\Administrator
Enter env to see what environment variables are present in the system:
You can find home=c:\documents and Settings\Administrator
Therefore, to change the Cygwin default boot path is to change the home environment variable for the value you want to.
Right-click My Computer, properties--Advanced environment variable, in the environment variable box of your own personal user, or in the following system variable box, new, variable name set to home, variable value For the specific path you want.
If it is built at its own user variable, then the valid range of this variable value is the current user.
If built at the system variable, then the valid range of this variable value is the current entire system, that is, no matter which user logs on to the system, this variable is valid.
I set it here as
Home=c:\cygwin\home
This way, each time you start Cygwin, you will automatically be transferred to your home path.
Cygwin using 3-Modify the default boot path for Cygwin