bash on windows看起来很美好,但是安装的过程不是那么美好。
碰到的第一个问题是下载总是中断,网络稍有波动就终止下载,自动退出。又不能断点续传,只能重新下载,折腾了好几次才下载完毕。
下载完毕了以后就提示“正在提取文件系统,这将需要几分钟的时间”,然后就一直卡在了这个地方,等了半个多小时也没用(bash对中文支持不好,一会儿就变成了乱码)。
百度无解,只能谷歌,发现在BashOnWindows的github项目中有这样一个Issue:Bash install hangs at “Extracting Filesystem”,一个WSL的开发者给出了以下信息:
After much effort I was able to debug this. We have a bug in our driver if you have more than 2 NT pagefiles on your system. Any of you that are experiencing this issue could you please try disabling all but one of your pagefiles and trying to launch bash?
See #358 and #538 for more info.
这个问题是因为在系统中有多个pagefile导致的,然后我在虚拟内存设置里关掉了两个分区的pagefile,只保留了一个分区的,重启,再打开bash,就顺利进入了(虽然还是乱码):