I have installed MSYS2. First, I had my HOME in /home/Laurent
, /
being c:/msys64
in Windows. Then I made different thinks, install Mingw, CMake, and especially msysgit, which has its own MSYS setup. Then when I run a MSYS2 shell, my HOME is now the Windows one: c:/Users/Laurent
. Probably I did some weird things.
In /etc/profile
, I can read:
# Here is how HOME is set, in order of priority, when starting from Windows
# 1) From existing HOME in the Windows environment, translated to a Posix path
# 2) from /etc/passwd, if there is an entry with a non empty directory field
# 3) from HOMEDRIVE/HOMEPATH
# 4) / (root)
So it seems that my MSYS2 has "switched" to the default HOME (1). Here is /etc/passwd
concerning my account:
Laurent:unused:1001:513:U-Win7\Laurent,S-1-5-21-1379731639-3004223336-974672684-1001:/home/Laurent:/bin/bash
Shall I replace it with:
Laurent:unused:1001:513:S-1-5-21-1379731639-3004223336-974672684-1001:/home/Laurent:/bin/bash
to restore my initial setup ? I am not sure of the syntax of this line which is not familiar to what I know from standard Linux distributions, and I would not like to mess my setup and possibly loose my shell history.
/etc/profile
. So I have modified it toc:/msys64/home/Laurent
and it works. Surprisingly,pwd
returns/usr/home/Laurent
instead of/home/Laurent
I expected. /usr exists in the shell, but is not in Windows Explorer. Besides,/
and/usr
are identical like if/usr
was a soft link to/
- touching a file is repercuted in the other and in c:\msys64\.