方案1,早期方案:
1.打开"注册表"
win + r 打开"运行",输入regedit ,
2.找到HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{GUID}\Flags
把值从7 改为5。重启电脑,完成。
方案2,推荐,适用于Windows Build 17093 及更高版本 WSL2
1.Linux子系统内增加 /etc/wsl.conf文件
2.增加以下内容
[interop]
appendWindowsPath = false