Troubles
Internet connection troubles
Guide from github.com/microsoft/WSL/issues/5336
Reset network
Open cmd as admin
ps1
sudo wsl --shutdown ; sudo netsh winsock reset ; sudo netsh int ip reset all ; sudo netsh winhttp reset proxy ; sudo ipconfig /flushdns ; sudo netsh winsock reset ; sudo shutdown /rSearch Network Reset in Windows Search, enable it and restart Windows.
If doesn't work go to next step.
WSL reset network config
On WSL terminal
sh
sudo rm /etc/resolv.conf || true
sudo rm /etc/wsl.conf || trueOpen wsl.conf to edit it:
sh
sudo vim /etc/wsl.confsh
[network]
generateResolvConf = false
[automount]
enabled = true
options = "metadata"
mountFsTab = falseOpen resolv.conf to edit it:
sh
sudo vim /etc/resolv.confsh
nameserver 8.8.8.8
nameserver 8.8.4.4Exit WSL and in cmd admin
sh
wsl --shutdownIf doesn't work go to next step.
Misc
- Disable Hyper-V feature