WSL 2 is now available in Windows Insiders

Craig Loewen

We’re excited to announce starting today you can try the Windows Subsystem for Linux 2 by installing Windows build 18917 in the Insider Fast ring! In this blog post we’ll cover how to get started, the new wsl.exe commands, and some important tips. Full documentation about WSL 2 is available on our docs page.

Getting Started with WSL 2

We can’t wait to see how you start using WSL 2. Our goal is to make WSL 2 feel the same as WSL 1, and we look forward to hearing your feedback on how we can improve. The Installing WSL 2 docs explains how to get up and running with WSL 2.

There are some user experience changes that you’ll notice when you first start using WSL 2. Here are the two most important changes in this initial preview.

Place your Linux files in your Linux root file system

Make sure to put the files that you will be accessing frequently with Linux applications inside of your Linux root file system to enjoy the file performance benefits. We understand that we have spent the past three years telling you to put your files into your C drive when using WSL 1, but this is not the case in WSL 2. To enjoy the faster file system access in WSL 2 these files must be inside of the Linux root file system. We have also made it possible for Windows apps to access the Linux root file system (like File Explorer! Try running: explorer.exe . in the home directory of your Linux distro and see what happens) which will make this transition significantly easier.

Access your Linux network applications with a dynamic IP address in initial builds

WSL 2 includes a huge architecture change using virtualization technology, and we are still working on improving the networking support. Since WSL 2 now runs in a virtual machine, you will need to use that VM’s IP address to access Linux networking applications from Windows, and vice versa you will need the Windows host’s IP address to access Windows networking applications from Linux. We aim to include the ability for WSL 2 to access network applications with localhost as soon as we can! You can find full details and steps on how to do this in our documentation here.

To read more about the user experience changes please see our documentation: User Experience Changes Between WSL 1 and WSL 2.

New WSL Commands

We’ve also added some new commands to help you control and view your WSL versions and distros.

  • wsl --set-version <Distro> <Version>
    Use this command to convert a distro to use the WSL 2 architecture or use the WSL 1 architecture.

    : the specific Linux distro (e.g. “Ubuntu”)

    : 1 or 2 (for WSL 1 or 2)

  • wsl --set-default-version <Version>
    Changes the default install version (WSL 1 or 2) for new distributions.

  • wsl --shutdown
    Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine.

    The VM that powers WSL 2 distros is something that we aim to manage entirely for you, and so we spin it up when you need it and shut it down when you don’t. There could be cases where you would want to shut it down manually, and this command lets you do that by terminating all distributions and shutting down the WSL 2 VM.

  • wsl --list --quiet
    Only list the distribution names.

    This command is useful for scripting since it will only output the names of distributions you have installed without showing other information like the default distro, versions, etc.

  • wsl --list --verbose
    Shows detailed information about all the distributions.

    This command lists the name of each distro, what state the distro is in, and what version it is running. It also shows which distributions is default with an asterisk.

Looking ahead and hearing your feedback

You can expect to get more features, bugfixes, and general updates to WSL 2 inside of the Windows Insiders program. Stay tuned to their experience blog and this blog right here to learn more WSL 2 news.

If you run into any issues, or have feedback for our team please file an issue on our Github at: https://github.com/microsoft/wsl/issues , and if you have general questions about WSL you can find all of our team members that are on Twitter on this twitter list.

Updates:

  • Changed the instruction to access your Linux files from Windows to explorer.exe .
  • Changed first sentence of post to spell out the WSL acronym.

69 comments

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

  • Sivan Koren 0

    Good update. In your next post, can you elaborate a bit on why development has taken to the virtual machine direction? Will development continue for wsl1? I think the genius of not having a virtual machine is what makes wsl so great! Can you explain how wsl2 differs from just installing Ubuntu through hyper V? Is the benefit to just share files? Linux drivers to do this are already available from Oracle. What is the goal? We didn’t get that from your post.

    • Craig LoewenMicrosoft employee 0

      I have some resources which might help you with those questions. 

      We have an hour long talk that we did which goes over all the details of why you might want to use this, and how it’s different than a traditional VM experience.

      If you’d like something quicker, the announce blog post goes over the general and our WSL 2 FAQ docs goes over some more questions that you might have.

  • Zac Kruger 0

    is there a method for setting the number of vcpus in wsl 2? the default appears to be limited at 8 and Set-VMProcessor doesn’t appear to be an option since it can only access discrete VMs.

  • Hisham Mounir 0

    Hi, first of all, thanks for developing WSL, I have been a long user for it, now that WSL 2 is out, I got it on my machine, now when I try to convert my current distro (Pengwin WSL linux), it fails to convert, can you please help ?

    PS C:\Users\hisha> wsl –set-version WLinux 2Conversion in progress, this may take a few minutes…For information on key differences with WSL 2 please visit https://aka.ms/wsl2Unspecified errorPS C:\Users\hisha>

  • Krzysztof Rapacki 0

    So because this runs on top of Hyper-V does it mean we cannot use it together with other virtualization software like vmware?

    • Ish Raqiyun 0

      Basically, but that is what I’m in particular trying to test out at the moment to verify.

    • Craig LoewenMicrosoft employee 0

      Correct, we go over what that exactly entails in our FAQ docs page.

  • Tim Man 0

    What?!? A VM? Can someone explain to me how this is a step in the right direction? This is a giant leap backwards. We have had, already have, and features galore with Linux in a virtualized environment. Why is WSL taking such a huge step back to bring us stuff we have now with VirtualBox or Parallels or VMware “transparency” features to make it seamlessly look like one desktop running on two operating systems? Even if you extend this “unity” feature to somehow include command line somehow, it’s still really two Seperate computers with different everything and selectively sharing via network with filesystem and security and the whole shebang on each side. If Microsoft is starting from a VM, you guys have soooo much catching up to do just to get where they are now and I’m still not sure how it would make Linux any more integrated to windows than it is now.

     

Feedback usabilla icon