WSL network name cannot be found

If you face this issue working with WSL, the root cause of the problem is invalid current directory.

How to fix it:

  1. open powershell
  2. select home directory
    wsl -d DISTRO --cd ~

where DISTRO is the name of the distribution, that can be obtained

    wsl -l

Source