Microsoft introduces Windows Subsystem for Linux 2 in latest Windows 10 20H1 build

Martin Brinkmann
Jun 13, 2019
Updated • Jun 24, 2019
Windows, Windows 10
|
25

Microsoft plans to integrate the Windows Subsystem for Linux 2 in the first major Windows 10 feature update after Windows 10 1903, the Windows 10 20H1 update.

The company released a new build to the Fast Ring Windows Insider channel that includes the new version of the Windows Subsystem for Linux. With the change come important improvements and changes that users and administrators need to be aware of.

First, the basics: The Windows Subsystem for Linux 2 is included in the Windows 10 Insider Preview Build 18917 released on June 12, 2019. It will also be included in future Insider Builds provided that Microsoft does not find critical bugs that need addressing.

WSL 2 needs to be installed before it becomes available:

  1. Make sure the Windows 10 build is at least 18917 (use winver to find out about that by launching it from Start).
  2. Open an administrative PowerShell prompt, e.g. by using the Windows-X menu.
  3. Run Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
  4. A restart is required.
  5. Open a PowerShell prompt again.
  6. Run wsl -l to display the available distros.
  7. To verify the versions of each distro, run wsl --list --verbose or wsl -l -v
  8. Run the command wsl --set-version <Distro> 2 to set a distro. Replace <Distro> with the name of the distro revealed by the command under 6).
  9. To make WSL 2 the default architecture, run wsl --set-default-version 2.

The new subsystem provides the same user experience as the current version in release versions of Windows 10.

windows subsystem for linux 2

Microsoft notes that the Windows Subsystem for Linux 2 comes with a "real Linux kernel" and that it changes how Linux binaries "interact with Windows" and the computer hardware.

One of the core difference between version 1 and 2 of the Windows Subsystem for Linux is that users are now encouraged to place files inside the Linux root file system. Doing so improves performance significantly according to Microsoft as they benefit from faster file system access of WSL 2.

Windows Apps may also access the Linux root file system with the release of this version. While WSL 1 still requires that users place files on the c: drive of the Windows installation, WSL 2 does away with that limitation.

WSL 2 runs in a virtual machine and that requires that the virtual machine's IP address is required for certain tasks. To access Windows network applications from Linux, one would need to know the Windows host IP and vice versa.

Other user experience changes between WSL 1 and 2 are listed on Microsoft's Docs website.

Windows Subsystem for Linux 2 comes with a range of new commands such as switching between version 1 and 2 of the subssystem or shutting down all running distributions at once. You find a list of commands on the Microsoft Dev Blog.

Now You: Do you use the Windows Subsystem for Linux?

Summary
Microsoft introduces Windows Subsystem for Linux 2 in latest Windows 10 20H1 build
Article Name
Microsoft introduces Windows Subsystem for Linux 2 in latest Windows 10 20H1 build
Description
Microsoft plans to integrate the Windows Subsystem for Linux 2 in the first major Windows 10 feature update after Windows 10 1903, the Windows 10 20H1 update.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Jules said on June 24, 2019 at 11:31 am
    Reply

    Hey, you have a small typo that cost me some time figuring out why I couldn’t get my hand on the correct version yet. The reason is that it does not yet exists :)

    Windows 10 Insider Preview Build 18971
    should be 18917

  2. thesane said on June 18, 2019 at 8:26 pm
    Reply

    i use WSL 1 extensively (bash/ssh/cat/python) with XMING if needed GUI as I develop on both windows and linux in the same time while administering other linux machines. Just installed WSL 2 yesterday but the idea of using VM instead of direct access seems redundant especially if you still can’t access the GPU/USB from Linux kernel which makes it worse than a virtual box machine with ubuntu installed and all features available except GPU access with even more control on the networking part which I am struggling with at the moment to be able to access internet from WSL 2 bash. It looks to be a bit of setback in this direction.

  3. lux said on June 17, 2019 at 8:44 pm
    Reply

    Thanks for posting my comment, sorry for not giving enough time to get past moderation.

  4. lux said on June 17, 2019 at 7:16 pm
    Reply

    was my comment censored? looks like i’ll never visit ghacks again.

    1. Martin Brinkmann said on June 17, 2019 at 7:29 pm
      Reply

      No it was not “censored”.

  5. dark said on June 17, 2019 at 4:00 pm
    Reply

    I wonder if it is possible to install KDE Plasma desktop environment on Windows 10 via WSL 2 so we can replace the entire crappy user interface of Windows 10 with KDE Plasma. Now that WSL 2 comes with real Linux kernel.

    Can you make tutorial if it is possible?

    @Martin Brinkmann

  6. lux said on June 17, 2019 at 5:46 am
    Reply

    If Microsoft would learn from it’s mistakes:

    Remove forced telemetry.
    Focus on the core operating system.
    Remove back doors.
    End partnerships with government spy programs: I.E: PRISM, MUSCULAR.
    Stop leaking data to the NSA: Special Source Operations (SSO) division
    Updates that function 100% and cause no new problems.
    Drop the SJW/P.C. mentality.

    People would consider windows a viable operating system in future releases.
    Sadly, it seems they will stick to their current Orwellian downward spiral.

    Linux developers rejoice, for the giant has hamstrung himself.

  7. Elli Williams said on June 15, 2019 at 10:23 am
    Reply

    Microsoft Windows is the biggest company in the world. We all use windows on a daily basis and Microsoft keeps updating itself, it launches new versions of windows time to time with great feature,
    The window is simply easy to use and cost effective. their support services are also very good they have highly experienced and professional experts who are always ready to resolve your query. To reach our Windows support number dial: 1-888-410-9071

    1. lux said on June 17, 2019 at 5:50 am
      Reply

      Why would i call Microsoft when i use Linux? ;)

  8. Bob Fleischer said on June 14, 2019 at 6:09 pm
    Reply

    Since this uses the Virtual Machine Platform, this sounds like another new feature, i.e., like Sandbox, that is incompatible with a non-Microsoft virtual system such as VMware (which I use extensively).

  9. Nicky said on June 14, 2019 at 12:52 am
    Reply

    Installed the preview build especially for this.

    I just got an application running with a prisma backend (postgres database), that runs via docker.
    That’s docker on linux … but on Windows.

    Things like a git clone or an npm/yarn install are so much faster than they were natively on Windows.

    I look forward to not having problems that other devs brush off as “windows specific” and never get fixed.

  10. GfWRocks said on June 13, 2019 at 7:57 pm
    Reply

    Git for Windows works just fine to run bash. WSL is just overkill and sucks big time.

    1. David Eaton said on September 5, 2019 at 5:22 pm
      Reply

      But WSL isn’t just for Git. I want/need it for Docker and to run Ansible scripts.
      I like Windows, I don’t want to use a Linux desktop, but having those features would be good.

  11. ilev said on June 13, 2019 at 6:51 pm
    Reply

    “first major Windows 10 feature update after Windows 10 1903, the Windows 10 20H1 update.”

    Shouldn’t the first major update after 1903 be 1909 ? and where is it ?

    1. Martin Brinkmann said on June 13, 2019 at 7:03 pm
      Reply

      General consensus is that 1909 will be a smaller bug fix update and that 20H1 will be the nxt major feature update.

  12. Janne Granström said on June 13, 2019 at 5:46 pm
    Reply

    So what if i have wsl 1 installed, does it upgrade it, do i need remove that before use wsl2?

  13. John Fenderson said on June 13, 2019 at 4:54 pm
    Reply

    “Do you use the Windows Subsystem for Linux?”

    No, I have no use for it. At my workplace, we do our Linux programming on Linux machines and Windows programming on Windows machines. WSL doesn’t offer anything that helps us out there. At home, I use Linux exclusively.

  14. Anonymous said on June 13, 2019 at 3:59 pm
    Reply

    “Drops” gave me the wrong impression. As if it was removed.

    1. Martin Brinkmann said on June 13, 2019 at 4:08 pm
      Reply

      Changed it!

  15. Steve#99 said on June 13, 2019 at 3:35 pm
    Reply

    Why settle for margarine when you can enjoy real cream & butter…

    https://ubuntu.com/
    https://www.freebsd.org/

    Runs in a VM and unlike ms versions, runs flawlessly inside Windows 7, XP, Servers 2003, 2008, and 2008 R2. Use Vbox which is an excellent, free hypervisor. Vbox runs VMs of linux, mac, win 7, win XP, unix, bsd, and if you want to get your privacy violated, you can run a win 10 VM too.

    https://www.virtualbox.org/wiki/Downloads

    For server/dev boxes, PuTTY controls nix from windows.

    https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    Be sure to lock ssh down using strong keys, only allow access to certain ip addys using ufw.

    1. Darren said on June 14, 2019 at 12:05 am
      Reply

      Steve#99 – Thanks for the info, but these are kinda comparing different things. Instead of the hassle of an isolated Linux virtual machine, the WSL natively runs Linux commands in Windows. Love Linux, but would be nice to harness some of its goodness from within Windows itself when it works better. If anything, this might just introduce more people to Linux and its commands.

    2. VioletMoon said on June 13, 2019 at 11:29 pm
      Reply

      The article may be a bit esoteric for some since the beauty of WSL 1 and WSL 2 isn’t readily apparent. In other words, why use a separate VM when the whole idea with WSL is to let Windows take care of things.

      “Instead of using a VM or container, WSL 1 virtualizes a Linux kernel interface on top of the Windows kernel. This means that running WSL only requires a minimal amount of RAM. And when not in use, the WSL driver isn’t loaded into memory, making it more efficient than a solution based on a VM or container. Users can then load a Linux distribution from the Microsoft Store and use it like an application on their PC. Windows 10 supports installing multiple Linux distributions side-by-side.”

      It sounds a lot like the way WUBI works.

      A more practical guide can be found on Petri and elsewhere on the Internet:

      https://www.petri.com/how-to-install-windows-subsystem-for-linux

      https://www.petri.com/what-is-windows-subsystem-for-linux-2

      1. John Fenderson said on June 14, 2019 at 7:44 pm
        Reply

        @VioletMoon: “The article may be a bit esoteric for some since the beauty of WSL 1 and WSL 2 isn’t readily apparent. In other words, why use a separate VM when the whole idea with WSL is to let Windows take care of things.”

        There’s something about WSL that I don’t understand at all — perhaps you (or someone else) can explain it to me. I understand what you’re saying in your comment about the difference between running Linux in a VM and using WSL, but I don’t understand what the utility of WSL actually is.

        In other words, what benefit does using WSL actually provide? What’s the use case for it?

    3. John Fenderson said on June 13, 2019 at 4:56 pm
      Reply

      @Steve#99

      A few years ago when I also ran Windows at home, I did this the other way around — I ran Windows in a VM on a Linux machine. That worked exceptionally well for me.

  16. Andy said on June 13, 2019 at 2:56 pm
    Reply

    I do use it quite a bit. I have some Linux tools like scripting YouTube-dl and server maintenance tasks that I just prefer using from the bash shell.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.