Search This Blog

MSYS2 inherits Windows home directory and path environment variable

1. Use Windows home directory as MSYS2 home directory

MSYS2 will use Windows %HOME% environment variable as it's $HOME directory. If you set %HOME% in environment variables (to the windows directory you need MSYS2 to use) it will work.

So what I did was just add a new enironment variable HOME and set its value to %USERPROFILE% which is the Windows home directory.


2. Make symbolic link

Open Command Prompt as Administrator, and run the command below to create symoblic link:
cd C:\msys64\home
mklink /D %USERNAME% %USERPROFILE%



3. Inherits Windows PATH environment variable

  • Uncomment MSYS2_PATH_TYPE=inherit in C:\msys64\msys2.ini
  • Pass -use-full-path to msys2_shell.cmd



see also

No comments:

Post a Comment