Watch the video:
Timestamps:
0:00 - Explanation
0:40 - Open WSL
0:50 - Check if DNS works & Pings work
1:00 - Changing DNS server on WSL/Ubuntu WSL
2:00 - Permanently set DNS server on WSL/Ubuntu WSL
If you’ve worked with WSL or Ubuntu under WSL, you’ve likely run across DNS issues where websites just don’t work, timeout and more issues happen. Changing your DNS server in resolv.conf works - But after a restart, everything breaks again. This guide shows you everything you need to know about fixing it all permanently!
sudo nano /etc/resolv.conf
/etc/wsl.conf