Skip to content
  1. We help small teams achieve big things.
  2. Our Technical Fellow just became a Microsoft MVP!
  3. We run the Azure Weekly newsletter.
  4. We just won 2 awards.
  5. We just published Programming C# 8.0 book.
  6. We run the Power BI Weekly newsletter.
  7. Our NDC London 2020 is now available online!
  8. We are school STEM ambassadors.
Mike Larah By Mike Larah Software Engineer II
Setting up Windows Subsystem for Linux (WSL) 2 for Windows 10 & Docker

In this post I will describe the steps needed to enable Windows Subsystem for Linux (WSL) 2 on Windows 10, and then how you can use the WSL 2 features with Docker for Windows.

In order to enable WSL 2, you first need to ensure you are running Windows 10 build 18917 or higher. At the time of writing this post, this requires joining the Windows Insider Program and enabling either 'Slow ring' or 'Fast ring' updates.

Once you have updated to a valid Windows 10 build, next step is to enable WSL. You can do this with the following PowerShell command:

You will be prompted to restart your PC. Once restarted, then install a Linux distro from the Windows Store (I used the Ubuntu 16.04 distro).

Next, ensure that the Virtual Machine Platform feature is enabled:

Now you can enable WSL 2 for your distro using the following command:

e.g.

Note: you can find a list of distro names by running:

And that should have WSL 2 enabled for your Linux distro.

Next, we need to install Docker Desktop for Windows. Use the installer here to download the latest version.

Once installed, we need to tell Docker to use WSL 2. Ensure Docker Desktop is running (you should be able to find it in the Start Menu), and then right click the Docker icon in the systray and select 'Settings'. Under the 'General' tab, ensure that 'Enable the experimental WSL 2 based engine' is checked.

You can read the Docker documentation to see the full list of advantages to using the WSL 2 tech preview.

Mike Larah

Software Engineer II

Mike Larah

Mike is a Software Engineer at endjin with almost a decade of experience in solving business problems with technology. He has worked on a wide range of projects for clients across industries such as financial services, recruitment, and retail, with a strong focus on Azure technologies.