DEV Community

Discussion on: Install Fedora 37 or earlier on Windows Subsystem for Linux (WSL)

 
bowmanjd profile image
Jonathan Bowman • Edited

OK. That could be the issue. Judging by your screenshot, you may want to first rm /etc/resolv.conf

Then can you follow the "Ensure DNS is functioning" part of the article and make sure that two files have been edited appropriately: /etc/resolv.conf and /etc/wsl.conf. Then restart your machine? I am very curious if that works for you or not.

Thread Thread
 
haosmos profile image
haosmos • Edited

After many attempts (a lot of re-installations and reboots of the computer) I finally installed fedora in wsl and set it up)).

Everything seems to be working. I was able to install everything I needed (my goal was to configure the right working environment for web development).

I don't know what the problem was — why I had to start over many times, but wsl (fedora) worked in a strange way: the standard commands didn't work ("cat", "clear", "nano", etc.), or it was impossible to download and install programs and utilities (Curl error (6): Couldn't resolve host name for mirrors.fedoraproject.org/metalink... [Could not resolve host: mirrors.fedoraproject.org].).

Eventually, I set up fedora according to your tutorial, except that I didn't execute the commands:

echo -e "[network]\ngenerateResolvConf = false" > /etc/wsl.conf

and

echo nameserver 1.1.1.1 > /etc/resolv.conf

Now I have this content of the resolv.conf file:

cat /etc/resolv.conf

// 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
nameserver 172.29.16.1

In my well-working wsl 2 ubuntu-20.04 the content of the resolv.conf file is exactly the same.

I don't know if this will be a problem in the future (what I didn't specify in the resolv.conf: nameserver 1.1.1 according to your instructions) but so far everything seems to be working fine.

Tell me, please, what do I need to specify in the resolv.conf: nameserver 1.1.1.1 file for?

Maybe I should add it to my resolv.conf file?

Or if everything works as expected I don't have to add or change anything in my resolv.conf file?

Thread Thread
 
bowmanjd profile image
Jonathan Bowman

Thank you for your feedback! I have updated the DNS section to include more specific instructions for removal of the offending link in Fedora 33, and also prefaced that with acknowledgement of the default automatically-configured resolv.conf provided by WSL. I hope this helps!