Skip to content

Instantly share code, notes, and snippets.

@vvgsrk
Created March 24, 2022 20:42
Show Gist options
  • Save vvgsrk/2684a119f54340b17d1bb29403702177 to your computer and use it in GitHub Desktop.
Save vvgsrk/2684a119f54340b17d1bb29403702177 to your computer and use it in GitHub Desktop.
Remove and add entrys in resolv.conf file
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