Skip to content

Instantly share code, notes, and snippets.

@liflovs
Last active April 27, 2022 15:26
Show Gist options
  • Save liflovs/e781fb649a3f68b04bb2df6494d68472 to your computer and use it in GitHub Desktop.
Save liflovs/e781fb649a3f68b04bb2df6494d68472 to your computer and use it in GitHub Desktop.
WSL force custom nameserver (Temporary failure in name resolution issue)
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