我的/etc/wsl.conf:
[network]
generateResolvConf = false
然而我的 /etc/resolv.conf 仍在继续重新生成。我指定:
nameserver 8.8.8.8
却发现它变成了:
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.29.128.1
注意:我尝试了下面建议的解决方案,但没有一个有帮助:
看来不可变文件属性(
chattr +i
)是必需的。运行以下命令: