Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL 2 keeps overwriting resolv.conf #3

Open
zcharym opened this issue Nov 15, 2022 · 0 comments
Open

WSL 2 keeps overwriting resolv.conf #3

zcharym opened this issue Nov 15, 2022 · 0 comments

Comments

@zcharym
Copy link
Owner

zcharym commented Nov 15, 2022

    > Ok, so I finally found solution in an old ticket: [#1908 (comment)](https://github.com/microsoft/WSL/issues/1908#issuecomment-641396913)

So the full set of commands that have to be run is:

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

that worked for me like charm. thanks a bunch!

Originally posted by @mdrijwan in microsoft/WSL#5420 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant