Recently, cygwin was installed to simulate the Linux environment. The local version is installed, which is fast.
After installation, the default home path is not/home/user, but c: \ Documents ents and Settings \ User.
First, configure your own user directory as follows:
1. Configure your user directory
Create your own directory under the/home directory, for example, my user name is Bom.
Copy the. bash_profile,. bashrc, And. inputrc files under the/etc/skel/directory to the BOM directory.
$ LS-a... bash_profile. bashrc. inputrc. mkshrc. Profile
2. Modify the home variable
The Home variable saves the default folder path to be located when you log on to the shell.
You can modify the cygwin. BAT file to implement
@ Echo offset lang = zh_cnd: chdir D: \ cygwin_root \ binset home = \ home \ bombash -- login-I
Set lang = zh_cn is used to allow shell scripts to output Chinese characters.
After the preceding settings, restart cygwin.