Last active
April 27, 2022 15:26
-
-
Save liflovs/e781fb649a3f68b04bb2df6494d68472 to your computer and use it in GitHub Desktop.
WSL force custom nameserver (Temporary failure in name resolution issue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm /etc/resolv.conf | |
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' | |
sudo bash -c 'echo "[network]" > /etc/wsl.conf' | |
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf' | |
sudo chattr +i /etc/resolv.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment