On WSL 2, when I try to connect to a website, I get an issue:
$ ping www.google.comping: www.google.com: Temporary failure in name resolutionNow, to fix this, I had to add /etc/wsl.conf with this content:
[network]generateResolvConf = trueAnd I need to change my /etc/resolv.conf to:
nameserver 8.8.8.8This works fine.
However when I restart my system, when I shutdown wsl or do anything similar, /etc/resolv.conf is overwritten with the previous value.
Of course, if I change /etc/wsl.conf to the following and restart again:
[network]generateResolvConf = falseThe fix mentioned above is gone again.
So how do I make my changes to /etc/resolv.conf permanent on WSL 2?




.jpeg)

