Whitewater Foundry

View Original

HOWTO: Enable WSL2 and Convert Existing Pengwin Installations

To Enable WSL2

  • Install Windows 10 Insider Preview build 18917, currently in Fast Ring.

  • Open PowerShell as an Administrator and run:

    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

  • Restart

To Convert Pengwin to WSL2

  • Open PowerShell and run:

    wsl --set-version WLinux 2

To Convert Pengwin back to WSL1

  • Open PowerShell and run:

    wsl --set-version WLinux 1

Known Issues

  • GUI apps will not work on WSL2 due to changes in networking. Workaround is to run:

    X410.exe /Public

    or

    vcxsrv -ac
    export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0

    An update for this is coming soon, per the WSL team.

  • Windows symbolic links cannot be traversed on WSL2.

  • IP addresses are dynamically assigned inside WSL2 which can cause networking issues, see GUI issue above.

  • It is possible to set WSL2 to be your default WSL with:

    wsl --set-default-version 2

    but this is not recommended at this time because installing a new WSL distro from the Store with WSL2 as the default is temporarily broken.

Tools to convert are coming to pengwin-setup shortly.

Official Microsoft documentation.