Windows Subsystem for Linux

After the Windows 10 Fall Creators Update (FCU) released on October 17th 2017 Microsoft started to officially support on Windows OS the Windows Subsystem for Linux (WSL) feature. If you are running this Windows 10 build or later, after enabling this feature, you will be able to install one or more Linux distros directly from the Windows Store.

With this kind of environment in place you will be able to connect to the clusters as explained in the how to connect from a UNIX-like environment guide.


To verify which Windows 10 build you are running open the Settings panel and go to System > About, you should see a screen similar as this one:

Windows OS build number

If your build is 16215 or later you are good to go. See the following steps to enable the feature and install a supported Linux distro.

  1. Open the Settings panel and search for the Turn Windows Features on or off dialog as shown below:

    Windows Features on or off
  2. In this dialog box look for the Windows Subsystem for Linux option and enable it. Click OK and you’ll be prompted to reboot, this is required WSL will not work until you’ve rebooted!

    Enabling Windows Subsystem for Linux
  3. After restarting, open the Microsoft Store and look for an available Linux distribution. Here are direct links to some store installers:

  1. You’ll see a screen like the following, select Get to start the installation:

    Ubuntu Linux in the Windows Store
  2. Once the installation has completed, select Launch. This will open a console window. Wait for the installation to complete then you will be prompted to create your Linux user account as shown below:

    Ubuntu Linux console running for the first time

    Create your UNIX username and password. This user account has no relationship to your Windows username and password and hence both can be different. Learn more about your UNIX account.

  3. After you finished the setup follow the section how to connect from a UNIX-like environment to connect to the clusters. Notice that all your Windows partitions will be automatically mounted at the /mnt path inside the Linux environment, e.g. C:\ will be at /mnt/c.

Set up X11 forwarding

As windows does not have an X11 server installed by default you’ll need to install a package providing one. You can use the VcXsrv software for that. We’ll assume in the rest of this guide that you are using the Ubuntu Linux app provided in the Windows Store.

  1. Download the latest VcXsrv version from here, make sure to choose the vcxsrv-64.version.number.installer.exe file. Follow the install procedure and go for the full install.

  2. Launch the program, you’ll get a wizard setup, leave all the default options, in the final screen choose Save configuration, you’ll be prompted to save a file that will work as a launcher with those options, is reasonable to save it on your Desktop.

  3. Open the Ubuntu Linux app and install the following packages:

    sudo apt install xauth x11-common x11-apps ssh

    add export DISPLAY=localhost:0 to your .basrc file, you can use the following command:

    echo "export DISPLAY=localhost:0" >> ~/.bashrc

    Restart the terminal, this is an important step, the settings will not take effect until you close it and open a new one.

  4. In the new terminal, you can verify that your local Xserver is working by running xcalc or xeyes. To connect to the clusters it is recommended to use an SSH config file and make sure you have the following options active for them:

    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes
  5. Login in the cluster, you should be able to run your graphical application. If you get some warnings during the login about No xauth data you can add the line XauthLocation /usr/bin/xauth at the bottom of the /etc/ssh/ssh_config file in your local Ubuntu Linux environment.

Take note that in future use you should always have an active X server running (make sure to have the xserver icon in your taskbar) before running the Ubuntu Linux app.