When you purchase through links on our site, we may earn an affiliate commission.Heres how it works.
My own WSL suffered this exact fault recently, and this is how I fixed it.
It became obvious when a simple update wasn’t yielding any results, with the repos just hanging.

you’re free to also diagnose a connectivity problem using theifconfigorpingcommands.
While we know the issue, how do we go about fixing it.
Hat tip here to theSuper User communityfor helping me figure it out.

The first thing to try is entering the following commands into PowerShell asadministrator.
What does this actually do?
The short version is that it will shut down WSL, reset the connection setting and flush the DNS.

Once completed, launch your chosen WSL distro again and check connectivity.
Hopefully, you’ll now see results indicating your connectivity has returned.
If you have multiple distros installed, this should rectify the issue for all of them, too.

Hopefully you’re now back online.











