curl: (6) Could not resolve host: on WSL curl: (6) Could not resolve host: on WSL curl curl

curl: (6) Could not resolve host: on WSL


This worked for me: https://github.com/microsoft/WSL/issues/4731#issuecomment-562935992

This is happening to me after my pc goes to sleep for long hours. Shutting down wsl2 (wsl.exe --shutdown) and open it again solves the problem until the next time the pc goes to sleep again for long hours.