Search code examples
powershellwindows-subsystem-for-linux

WSL PowerShell always returns Processing fstab with mount -a failed


I've installed WSL for my Windows 11 distribution and also Ubuntu 20.04. I saw that many people say that I can use commands without opening a distro with the wsl command.

Somehow that does not work for me. As soon as I type in a command with wsl the result is:

Processing fstab with mount -a failed.

So for example: wsl rsync -r -v /mnt/d/DUMMY_SOURCE/ /mnt/e/DUMMY_DESTINATION

The only wsl command that really works is wsl -l -v

  NAME                   STATE           VERSION
* docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2
  Ubuntu-20.04           Stopped         2

What is wrong with my setup?


Solution

  • As I posted this question here I was already recognizing this star before the docker-desktop-data distro. And that is where the problem comes from.

    The star here signalizes that this one is the standard distro which is wrong of course. You need to check with wsl -l --all which one is the current default distro. For me it was:

    Windows Subsystem für Linux-Distributionen:
    docker-desktop-data (Standard)
    docker-desktop
    Ubuntu-20.04
    

    After that change it to the right one (for me Ubuntu):

    wsl --setdefault Ubuntu-20.04
    

    Now the commands work as they should!