wls2和win10系统环境变量混淆解决办法

1.官方提供办法:

这是用来关闭互操作性

echo 0 > /proc/sys/fs/binfmt_misc/WSLInterop

  如果要重新打开

echo 1 > /proc/sys/fs/binfmt_misc/WSLInterop

2. 网上其他办法(这种办法测试有效,我的系统是wsl2+archlinux)

a.在wsl终端输入:

echo "[interop]\nenabled=false\nappendWindowsPath=false" | sudo tee /etc/wsl.conf

然后在ps中重启服务wsl服务:

net stop LxssManager
net start LxssManager

b.如果已知distro名,还可以

wsl --terminate <distro名>

来结束wsl distro,这个有待测试

posted on 2020-11-27 13:50  消失的森林  阅读(646)  评论(0)    收藏  举报

导航