Skip to content

Windows - Install Windows Subsystem for Linux (WSL2)

Note

SDE Windows support is only available through Windows Subsystem for Linux (WSL2), not native Windows.

Installing WSL2

For complete installation instructions, see How to install Linux on Windows with WSL.

The installation process installs Ubuntu as your default WSL2 distribution. Once installation is complete, search for Ubuntu on the Start menu, then select the result to open a terminal window in the bash shell environment.

For more information, see the following topics from Microsoft:

Troubleshooting

Network Connectivity Issues - VPN

VPN software may overwrite DNS configuration, which results in network connectivity issues under WSL2.

To fix network connectivity issues under WSL2:

  • Run the following script, then restart your WSL environment:

    sudo echo "
    [network]
    generateResolvConf = false" >> /etc/wsl.conf
    
    sudo echo "search corp.company.com awscorp.company.com companytype.com
    nameserver 209.196.203.128
    nameserver 209.196.212.128
    options timeout:2 attempts:3" > /etc/resolv.conf
    

Note

This script stops WSL from automatically generating a resolv.conf file, then updates resolv.conf to include known working DNS server entries.

Another solution for VPN related DNS issues is the wsl-vpnkit script, which provides network connectivity to WSL2 when blocked by VPN. This launches a Windows service using the wsl-vpnkit WSL2 image that dynamically corrects DNS. Compared to other static DNS fixes, this continually and dynamically fixes DNS for both ON and OFF VPN modes. For more information, see the wsl-vpnkit README.

WSL2 Instability

The WSL2 installation under Windows can become unusable. If this happens, try updating the WSL2 installation.

To update the WSL2 installation:

  • Run the following command:

    wsl.exe --update
    

    Info

    You can add the --pre-release flag to get the latest bug fixes, but this can install pre-released features as well.

WSL2 Backups

You can periodically perform a full export of your distribution file system to a tar file. This gives you a backup or checkpoint to restore from if your file system becomes corrupted.

To create a WSL2 backup:

  • Run the following command:
    wsl.exe --export $distro $file
    

Installing Node.js

See Linux - Installing Node.js