In /etc/resolv.conf
it says:
# 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
Microsoft Windows [Version 10.0.19041.329]
Ubuntu lsb_release -r
WSL 2
/etc/wsl.conf
didnt exist for me, so create it and add the following text to it:[network]
generateResolvConf = false
/etc/wsl.conf
and edit the auto generated nameserver which fails to resolve, change it to something like 8.8.8.8
./etc/wsl.conf
has reverted soon back to something like 172.30.16.1
which cant resolve github.com or PPA's etc.Not to change the nameserver as per the instructions.
Windows is changing the nameserver to something that doesnt work. The fix to the fix is not working.
Ref #4285 (the de-facto hangout).