The Windows Subsystem for Linux BUILD 2020 Summary

Craig Loewen

This year at an all virtual BUILD conference we had many exciting announcements for the Windows Subsystem for Linux (WSL)! This blog post gives you a summary of all the WSL news, including what’s available now and what you can expect in the future.

WSL’s BUILD news at a glance

Please read on below for the details for each item.

Available this month

Support for Windows Subsystem for Linux 2 (WSL 2) distros is coming this month in the Windows 10 May 2020 Update

4 years ago, at Build 2016, Microsoft surprised the world by announcing Windows Subsystem for Linux – WSL (also known at the time as “Bash on Ubuntu on Windows”). WSL enables Windows users to run native, unmodified Linux command-line tools and apps directly in Windows, alongside all their favorite Windows apps and tools. WSL usage has grown enormously from initially just a few thousand people downloading the first preview build to more than 3.5 million monthly active devices today!

However, we wanted WSL to do more – to run all Linux apps and tools, and to run apps and tools faster. At Build 2019, the WSL team unveiled the first preview of WSL 2, which utilizes new capabilities in Windows’ Hypervisor Platform to run distros and tools in containers, atop a real Linux kernel image that is built and delivered by Microsoft, hosted in a lightweight VM, which boots from cold in less than 2s! This means that WSL 2 delivers full system call compatibility with a real Linux kernel and is 3-6x faster compared to earlier versions of WSL. You can easily set the version of any WSL distro to be using WSL 2 with the command: wsl.exe --set-version <distroName> 2.

The response from the community has been huge and, frankly, positively overwhelming – sincerest thanks to everyone who ran WSL 2, filed issues, and asked for features, you’ve helped us make WSL2 even better than we hoped it could be!

Docker Desktop released a new version using WSL 2 as their backend

WSL 2’s new capabilities have not gone unnoticed by our partners either!

Shortly after WSL 2 was announced, Docker Inc. decided to host Docker Desktop for Windows atop WSL 2! Following a successful preview period, Docker has announced that Docker Desktop for Windows will now default to run atop WSL 2 when installed on the Windows 10 May 2020 update, which will bring Docker Desktop to Windows Home users as well.

This change to host Docker on WSL 2 will result in containers booting up faster, while consuming fewer resources on the host machine due to WSL 2’s more lightweight footprint vs. full VMs.

You can learn more about the Docker Desktop WSL 2 backend here.

Current roadmap: What’s coming to WSL

You’ll soon be able to install WSL with a single command. Just open a Windows Terminal and enter `wsl.exe –install`

One common complaint about WSL is that it’s not easy to find and enable. We agree, which is why we’re working on some improvements to the wsl.exe command-line tool to help you install WSL. Soon you will be able to simply install WSL by entering: wsl.exe --install in your command-line!

Image WSLInstall

This command will be added to every Windows machine so that all you need to do is open a Terminal window elevated with administrator privileges and run wsl.exe --install. From there the WSL optional components will be enabled, and your specified distro will be downloaded and installed for you automatically upon restart.

You can expect to see initial releases of this feature in the next few months in the Windows Insiders Fast Ring.

WSL 2 will be the new default when installing for the first time

We’re also introducing the change to make WSL 2 the new default distribution type when installing WSL for the first time. WSL 2 brings significant improvements and we found that the majority of our users on Insider branches are using WSL 2 distros. When developing wsl.exe --install it made sense for it to default to what people are using: WSL 2, and we’ve included this as well for any new installations of WSL when enabling the ‘Windows Subsystem for Linux’ optional component. You’ll see these changes in the Insiders Fast ring in the next few months alongside the wsl.exe --install improvement.

WSL will support GPU Compute workflows

Adding CUDA and/or GPU Compute support to WSL has been our #1 most requested feature since our first release! Over the last 3+ years, the WSL, Virtualization, DirectX, Windows Driver teams, and our silicon partners have been working hard on a complex engineering feat to deliver this capability.

This is why we’re thrilled to announce that we will start previewing GPU compute support for WSL in Windows 10 Insider builds within the next few months!

Initially, the GPU compute capability will support two scenarios:

  • NVIDIA CUDA
    • Supports existing Linux tools & workflows used by professionals
  • DirectML
    • Initially targeting beginners and students, leveraging DirectX 12 capable GPUs from several vendors
    • The team will be releasing a preview package of TensorFlow with a DirectML backend enabling hardware agnostic acceleration of AI & ML workloads across the breadth of Windows hardware – DirectML will also support native Windows too, including TensorFlow on Windows!

Once this preview is released, you will simply need to ensure that you have the latest Windows Insider Fast build, WSL 2 installed, install the correct driver for your GPU from the hardware vendor, and then you’ll be ready to start developing, training and testing your machine learning and AI models inside of WSL!

WSL ML gif

This change will be released to the Windows Insiders Fast ring in the next few months. For all the details of what this change means and how it was made possible, please read the DirectX Developer blog post.

Adding Linux GUI app support to WSL is on our roadmap

One of our other most prolific requests is to support not just command-line apps, but Linux GUI apps as well. For example, some users want to run their preferred Linux GUI text editor or IDE in a Linux environment and work on their code stored locally within their distro’s filesystem, or simply develop Linux GUI apps on their Windows machine.

Our goal is for you to be able to run Linux GUI apps on your desktop seamlessly alongside your Windows apps. This will enable you to use Linux apps to edit, build, and run your code, visualize data plots in Python, or even use applications that are optimized for a Linux environment.

At BUILD we demonstrated an early version of this work, running a few GUI sample apps directly from WSL such as Eye of Gnome, gedit and the mpv media player. These apps connected to a wayland server running inside of WSL, which communicated with a RDP client on the Windows host. You can see a screenshot of this in action below where we’re running the GNOME file manager in WSL and Outlook side by side.

Image WSLGUIApps

These changes are on the WSL’s team roadmap and you can expect to hear more about this work by holiday 2020.

Stay Involved

To summarize, once you update to the Windows 10 May 2020 Update you’ll have full support for WSL 2 distros! If you join the Windows Insiders Fast Ring you’ll be ready to start receiving the latest WSL features including the new install experience and GPU compute within the next few months.

There’s lots of exciting news and features coming to WSL, so please stay tuned to this blog for the details of any big announcements. You can follow me on Twitter @craigaloewen or members of the WSL team that are on Twitter for any news there as well. Please check out Kevin Gallo’s blog post for all of the Windows developer focused news from BUILD. Thank you for supporting WSL!

13 comments

Discussion is closed. Login to edit/delete existing comments.

  • Steve 0

    Awesome! Finally GPU support is coming to WSL.

  • Fazil Babu 0

    Will webcam access be available in the future?

    • Malthe Cwlnd 0

      +1

      Would be great.

      BR

      Plakater

      Minida

  • Frank Bowes 0

    Could I run Steam linux version on the subsystem with Vega 64?

  • Ascii Wolf 0

    Great news! Now if only Windows 10 had SFTP support in Explorer, that’s the only thing I am missing. 🙂

    • Rucadi Kotori 0

      I usually use wsl2 with sshfs to get SFTP Support in the explorer, not the best solution but it works!

  • Frédéric THOMAS 0

    That sound great guys, thanks !!

    Questions:

    1- When could we expect “GUI app support to WSL” in slow ring and public ?
    2- Will it support different DPIs, multi screens, full Linux desktops or only apps ?

  • Paolo Lampitella 0

    Is WSL in “Adding Linux GUI app support to WSL” intended as WSL, WSL2 or both?

  • Damien Daspit 0

    In Windows, the full GPU memory is not available to a process, unlike Linux which has full access to the memory. In WSL, will processes have full access to GPU memory like normal Linux?

  • Dima Pursanov 0

    Has anyone even tried this thing in reallife development? There seem to be clear problems with memory leaks and other (I’m on latest preview of Windows 10 2004, so probably it’s already a release candidate)… For example:
    https://github.com/microsoft/WSL/issues/4498#issuecomment-634240548
    I just can’t continue Angular development with this distribution. Fortunately I’ve copy of WSL1 same distribution, so I can compare the two systems and the same setup with SAME applications just works OK in WSL1. The most interesting fact is that WSL2 is kind of VM (so for example it’s OK to have some memory leaks for now), so it’s FULL Linux, not the command interpreter/translator; but even there ng serve is just not starting the work. I really tried with 2 clean installations, the result was the same.

  • emarsk 0

    Soon, the best Linux distro for desktop will be Windows 😁

  • NN 0

    Do you plan adding raw sockets support for WSL?

Feedback usabilla icon