Windows 10 to Include a Linux Kernel for WSL

Posted on May 6, 2019 by Paul Thurrott in Windows 10 with 62 Comments

Future versions of Windows 10 will ship with a real Linux kernel that offers dramatically better WSL performance.

“Beginning with Windows Insiders builds this Summer, we will include an in-house custom-built Linux kernel to underpin the newest version of the Windows Subsystem for Linux (WSL),” Microsoft’s Jack Hammons announced. “This marks the first time that the Linux kernel will be included as a component in Windows. This is an exciting day for all of us on the Linux team at Microsoft and we are thrilled to be able to tell you a little bit about it.”

The inclusion of a Linux kernel in Windows 10 came as a bit of a surprise, even for those of us, like me, who had been pre-briefed by Microsoft about what to expect at Build this year. Consider the following description of WSL 2, which Microsoft provided to the press ahead of the show:

“The next generation of the Windows Subsystem for Linux (WSL) will offer technology built for Microsoft Azure to the Windows Desktop to address the top customer requests for improved performance and compatibility … developers will experience up to twice as much speed for file-system heavy operations, such as Node Package Manager install.”

That doesn’t say anything about a Linux kernel, and current versions of WSL utilize an emulator, not a real Linux kernel. And based on that documentation, I wrote what I wrote earlier about this and other changes that will impact Windows 10 this year.

But a Microsoft blog post that includes a reference to this new feature explicitly mentions the new kernel, and the press didn’t see it until this morning, like everyone else.

“Windows Subsystem for Linux 2 (WSL 2) is the next version of WSL and is based on a Linux 4.19 kernel shipping in Windows … WSL 2 also improves filesystem I/O performance [and] Linux compatibility,” the post notes.

Hammons’ post goes into greater detail about the kernel. It will initially be based on version Linux 4.19, the latest long-term stable release of the platform, and it will be updated to each new long-term stable release to ensure that it’s always up-to-date. Microsoft says it is a “drop-in replacement” for the current emulator. It will also be fully open source.

“This is the culmination of years of effort from the Linux Systems Group as well as multiple other teams across Microsoft,” Hammons notes. “We are excited to be able to share the result and look forward to the new and interesting ways in which you will use WSL.”

It’s a brave new world, people. This is also probably one of the reasons that Microsoft hasn’t begun testing Windows 10 19H2 yet: This will likely be where WSL 2 is first tested and then released, and I suspect that Microsoft wanted to keep news of the Linux kernel a secret until Build.

Tagged with ,

Join the discussion!

BECOME A THURROTT MEMBER:

Don't have a login but want to join the conversation? Become a Thurrott Premium or Basic User to participate

Register
Comments (62)

62 responses to “Windows 10 to Include a Linux Kernel for WSL”

  1. Avatar

    bluvg

    Much has changed since: https: //www.youtube.com/watch?v=86j8zOsmNFE

  2. Avatar

    Daekar

    So... For those of us who aren't software devs, what does this mean? Am I going to be able to run Linux software on my Win10 machine now as if it were native-ish?

    • Avatar

      bill_russell

      In reply to Daekar:

      command line back end software that does a lot of file access will be faster. I don't think GUI linux software runs at all on WSL. I tried using a WSL bash shell for rsync to backup but it choked on the job and Cygwin worked great. But this was 6 months ago.

  3. Avatar

    Tony Barrett

    Two schools of thought here;

    Embrace, Extend, Extinguish - the Microsoft we know that uses this method to destroy competition

    If you can't beat 'em - MS would rather embrace Linux than fight it.


    I still can't think of many sysadmins who think Windows is a good platform to run Linux on though. Why not just use the real thing? Maybe when MS finally realize how terrible UAC is, and then look more closely at sudo!

  4. Avatar

    Darekmeridian

    How long till the other shoe drops and we see a Microsoft Linux distro?

  5. Avatar

    azoko

    Full Linux Kernel shipping with OS

    Edge based on Chromium


    With WCOS basically using virtualization for Win32 like Linux on Windows will, I have a feeling Android apps coming to Windows soon. All these changes are just getting devs/admins more comfortable with the idea.


    MS gets to tailor the true productivity experiences with their native stack and allow other apps to fill in the gaps and hopefully use a lot of Azure behind them.

    • Avatar

      hrlngrv

      In reply to azoko:

      . . . WCOS basically using virtualization for Win32 like Linux . . .

      And UWP apps all running in sandboxes, Windows Core seems to have become VM. Will anything foreground that a user would notice still be running natively? When will we be able to set the Linux kernel and subsystem as a desktop shell? After that, when could we have one account running Win32 in one monitor and another account running Linux/WSL in another monitor, able to switch between them using the mouse or keyboard shortcuts?

  6. Avatar

    ZeroPageX

    AFAIK, WSL isn't using emulation. It's kind of like WINE in that Linux system calls are being re-routed to Windows calls. They also had to implement Linux calling conventions and a parser for the ELF binary format, but beneath all that, it's x86-64 code being executed. With a kernel, wouldn't they then need an emulator?


    Anyway, I'm very interested to hear more. I work in a hybrid Windows/Linux environment, and I very much prefer Windows. Getting these systems to talk to each other used to be a pain until WSL. It's one of my favorite Windows 10 features!

  7. Avatar

    rmlounsbury

    This is a huge announcement and makes Linux a complete first class citizen on Windows 10. I never thought I'd see the day where Microsoft is shipping an honest-to-god Linux kernel built into Windows 10 with the purpose to run Linux on Windows.


    I used to always maintain a Linux VM or dedicated box to keep up with Linux and do various tasks. With this I can just stick to Windows 10 and have multiple different Linux distros at my fingers without any special setup. As an IT pro that has been Microsoft first this lets me continue to live in the Windows world and leverage Linux whenever I need to.


    I'm super excited for this.

  8. Avatar

    hrlngrv

    One thing I'm waiting for is Windows support for Linux file systems. If it has to come through WSL, fine.

  9. Avatar

    llewen

    I think what we are seeing is the first steps toward Microsoft doing with Windows what they have already done with Edge, and that is basing it on open source. I think Windows is going to become another operating system based on Linux code, like iOS and Android.


    It just makes sense for them on so many levels. The biggest failing of Windows in recent years has been the abject failure of the Windows Store, a software delivery platform with no content, that no one wants to put any resources into developing anything for. If Windows becomes Linux based it would, I would think, make cross platform development much easier, as well as potentially opening up the entire catalogue of Android, and maybe even Apple software.


    It would slash development costs for the Windows ecosystem, and presumably offer a product that is much more stable, which is another bugbear of everything Windows. And a compatibility subsystem for old Windows software based on wine could offer the kind of stable, native performance that even Windows 10 itself doesn't offer for old Windows software.

  10. Avatar

    Winner

    A real OS at last.

  11. Avatar

    nfeed2000t

    I quickly lost interest in Windows Subsystem for Linux shortly after it first arrived. The home root directory was in an unintuitive place and users were not supposed to change Linux files with Windows tools for fear of breaking something because of metadata mismatches.

    I want to open a terminal window, run a Bash/Python command/program from any directory, at any time, and write/read files without worrying about breaking something. Will including a new Linux kernel fix any of the previous issues or will it simply provide better performance?

  12. Avatar

    bill_russell

    Still prefer my KDE GNU/Linux based OS no matter even if Windows 10 ends up gutted, powered by Linux kernel underneath. I have a headless Windows 10 machine via rdesktop too for pretty much now just maintaining an old MFC application for a customer, that would never be rewritten. Always better to have multiple native machines if possible. I have a hackintosh as well but never use it.

  13. Avatar

    rmac

    sounds as though Windows is MS's 2nd sacrificial pawn following a Chrome based Edge.


    this ahead of abandoning the OS altogether?

  14. Avatar

    Jhambi

    Can someone explain in simple terms how this thing works. Does the kernel run in hyper v ? isn't that more overhead?

    • Avatar

      bluvg

      In reply to Jhambi:

      Not sure what they're planning yet, but they have a couple options already (full Linux VM or LCOW): https ://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers

    • Avatar

      Alastair Cooper

      I just hope it doesn't break the ability for WSL to co-exist with VirtualBox or VMware since Hyper-V doesn't work alongside them. I need to use those for some applications.

  15. Avatar

    Bill Strong

    This could be very interesting. With a full kernel, and it being open source, even if the version Microsoft ships with Windows doesn't have filesystem support for othes FS, depending on if they lock it down, you can compile your dev version with those FS, compile in support for enough graphics to get GPGPU and rendering working.

  16. Avatar

    j_c

    Glad to hear they are sticking with it. I used Windows and WSL for my daily driver all of last year. It got the job done but honestly it wasn’t always pretty, performance wasn’t great and I didn’t like how they handled files. I finally gave up and switched to a MacBook. Happy I did. If I ever switch again it will be to an actual Linux distribution full time or if it ever gets to production ready Crostini/Chromebook or Fuchsia whatever it becomes. My Windows days are over.

  17. Avatar

    dcdevito

    Biggest announcement (for me) today, hands down. Lots of other great stuff too, though. This means full system calls in Linux. Huge news.

  18. Avatar

    thalter

    Most die hard Linux users are still not going to run Windows. Running Linux on top of Windows will never be as efficient as just running Linux, and using Windows to run Linux apps makes about as much sense as using OS/2 Warp to run Windows applications back in the day.

    • Avatar

      dcdevito

      In reply to thalter:

      Not true at all. WSL allows a web dev to write software for Linux servers yet still enjoy a much more refined desktop OS in Windows.

    • Avatar

      rmlounsbury

      In reply to thalter:

      Microsoft isn't going after a die hard Linux user. They are going after developers which is an entirely different group of people. They need high performing environments and adding the Linux kernel to Windows 10 will give that group a huge bump in performance making Windows 10 a great and attractive platform for the developer crowd.


      Apple used to dominate this space thanks to the Unix underpinnings and proper terminal. But I'd argue that Microsoft is blowing past macOS as a development platform. There isn't much you can't do with Windows 10 these days.

      • Avatar

        Steve Martin

        In reply to rmlounsbury:

        File system operations in Windows are still sluggish and slow. Traversing large git repos take several seconds on Windows. The same repo on Linux or macOS almost instantly.


        And Windows is still hampered by it's ancient C: D: paradigm for partitions.

  19. Avatar

    hrlngrv

    Will the new kernel allow for using Linux file systems rather than NTFS?

    • Avatar

      wright_is

      In reply to hrlngrv:

      For secondary partitions, that aren't directly available under Windows, possibly. For booting Windows from? Doubtful. You still need to boot Windows Kernel first. I assume that the Linux Kernel is running in some sort of custom Hyper-V/container based environment within Windows.

      • Avatar

        IanYates82

        In reply to wright_is:

        I think they mentioned FUSE, but that's not quite the same thing


        They're talking about a literal drop-in replacement. So I wonder if the Linux file system will have its stuff in a vhdx or if it'll still be in files nested in your app_data? The latter is drop-in replacement - and they did heaps of work on that in the last couple of releases to make file access work nicely each way so it'd be a shame to lose it.

        • Avatar

          hrlngrv

          In reply to IanYates82:

          Weren't there Linux under Windows products back in the early 2000s which used a huge (multiple GB) Windows file as a logical drive which could use a Linux file system? Not all that different from how compressed drives worked under MS-DOS 6.x.

  20. Avatar

    Dan1986ist

    So, could Microsoft take their own Linux kernel,put new Edge on top and have a Microsoft version of Chromebook that runs Chromium Edge instead of Google's Chrome?

  21. Avatar

    sevenacids

    Sadly, Hammons' post doesn't mention how this kernel will be run within Windows (if at all). I mean, if this is going to be just like a barebones Linux VM in Hyper-V, I don't see the point in it. And how does it share the hardware and file system access if it's not just a VM? I mean, since he speaks of "kernel" here, I assume it will require kernel space privileges and how is this going to work side-by-side with the NT kernel if not via a hypervisor.

    • Avatar

      warren

      In reply to sevenacids:


      The Linux kernel has been capable of running as a single process within another operating system for 15+ years, without virtualization. It's called "user-mode Linux". It uses the virtual memory management system of the OS it is running on, and piggy-backs on its drivers. This could be a variation of that. Windows already has the technology to create new processes that have no Windows-y behaviour in them (e.g. threads), so they've already got all the pieces.

  22. Avatar

    MacLiam

    Count me among the interested. I have a couple of post-retirement projects that pretty much require me to use genetic and neurological imaging suites available only for Linux. A few weeks ago I downloaded the Current WSL and added Ubuntu from the store. I managed to set up a VM, but I haven't yet found the secret that will let me successfully install the analysis packs. Maybe the familiarity of a more Windows-ish Linux would let me get past whatever it is I don't see at the moment.

  23. Avatar

    skane2600

    While I'm sure some of the young developers at Microsoft who were taught the Tao of the Tux in college are thrilled that they can use their preferred OS at work, I'm not sure many developers in the outside world are going to change their development habits because this has been added to Windows.

    • Avatar

      hrlngrv

      In reply to skane2600:

      Unless MSFT has become collectively stupider and far less wise than you, I figure MSFT wouldn't be wasting resources on this unless MSFT believed it was in their best interests. IOW, unless you've read the proprietary internal info MSFT has on this and have reasoned disagreements with it, perhaps you have little to no idea what you're talking about.

      • Avatar

        skane2600

        In reply to hrlngrv:

        I never make the assumption that a decision a company makes must be good or otherwise they wouldn't have made it. I'm sure the powers that be at Samsung thought releasing the Galaxy Fold was in Samsung's best interest.


        I haven't seen anyone articulate a theory on how doing this will improve Microsoft's bottom line. If you have a theory, let's hear it.

        • Avatar

          hrlngrv

          In reply to skane2600:

          One theory would be that web development is better, how ever you'd want to define better, under Linux that Windows. Another theory would be that your previous statement was part right, that many college/university CS students learn their craft using Linux, so want to use the same tools upon graduation. As young people used to Linux enter the workforce and old people leave it, wouldn't even you expect development habits to change over time?

          • Avatar

            skane2600

            In reply to hrlngrv:

            First, remember that developers are a minority population among Windows users. Former CS students that are dedicated to Linux are most likely to just use Linux. Unlike MS's internal developers, there's no pressure to include Windows for development.


            Although there could be more subtle profit opportunities, the straightforward evidence that this move would be paying off for MS would be if it led to a significant increase in the number of Windows users and thus more revenue through OEM Windows purchases and profits related to the collection of personal data (if that's really a thing) and advertising through Windows. IMO, this isn't going to happen.

            • Avatar

              hrlngrv

              In reply to skane2600:

              . . . remember that developers are a minority population among Windows users . . .

              Never forgotten, but while WSL support is a bundled feature, there's no bundled/installed Linux distribution. It takes user action to add one (or more), so it's not unreasonable to infer that those using WSL do really want to use it rather than accidentally having launched it like they could have accidentally launched EUDCEDIT.EXE.

              Perhaps the rise of Azure running Linux services and applications also makes it useful for some (few as a % of all Windows users, but still significantly many) to have access to WSL.

              Finally, perhaps this is more defensive on MSFT's part than a new profit opportunity. That is, perhaps WSL means maintaining the number of PCs sold with Windows preinstalled rather than buying whiteboxes to run Linux for developers who spend most of their time using Linux tools.

              I figure the WSL user base is comparable in size to the Visual Studio user base, so it just won't matter to 90% or more of Windows users. OTOH, I also figure that MSFT sees some value in providing it even if you can't perceive it.

              • Avatar

                skane2600

                In reply to hrlngrv:

                WSL will be used only by devs that want to use it? I would consider that axiomatic, but it doesn't address my comment in any way I can see.


                I think it's safe to assume people who buy a Windows machine do so because they need to run Windows applications. That would remain true whether WSL exists or not. If they are Linux developers or web developers who prefer Linux and have no need for Windows programs, they are going to buy "whiteboxes" with Linux regardless of whether WSL exists or not.


                If they really needed both and there was no WSL, they'd just buy both kinds of PCs. So to the extent that such users exist, having WSL would probably hurt PC makers more than having it would help Microsoft.


                I guess the evaluation comes down to what one considers "significantly many" potential users.

                • Avatar

                  hrlngrv

                  In reply to skane2600:

                  People buy Windows PCs in no small part because they don't want to pay for Macs and it's often quite time-consuming to find machines which don't come with Windows preinstalled.

                  You really believe users who need both Windows and Linux would buy 2 PCs rather than use VMs? WSL is VM-like without as much overhear.

                • Avatar

                  skane2600

                  In reply to hrlngrv:

                  There was a time perhaps 25 years ago that a Mac was plan A and a Windows PC the poor man's plan B, but I doubt that many people today just settle for Windows because they can't afford a Mac. Macs can do only a subset of what PCs can do, but that subset covers most of what the majority of users need. So for most people they are about the same but you pay more for the Apple logo.


                  I guess if a user has very modest needs for Linux they'd be OK with using a VM instead of buying two computers.

    • Avatar

      popasmuerf

      In reply to skane2600:

      Ok, so clearly you don't know what you are talking about. This has nothing to do with hipsters and their adherence to the "Tao of Tux" and everything to do with the fact that developing software that is generally platform agnostic has always been a pain in the ass on Windows. There is a reason why developers outside of Windows shops that exclusively target Windows as a platform given the choice WILL ALWAYS choose a linux or MacOS development rig over one running windows(All of these computing "historians" seem to forget that *nix was created specifically for programmers)...there is a reason why startups and anyone who doesn't have money to waste on Microsoft licensing will select running a Linux backend over that of Windows....and Microsoft knows it. Do you only honestly believe the porting SQL server and the 100% open sourcing of dotNet(along with ASP.NET) , their development of custom Linux kernels for Azure that all happened years ago...and now the release of VS Code, and the inclusion of a full Linux Kernel in Windows are all because of the bitching and moaning of recent grads ? LOLz whut ? Even the whole "But I can only game on Windows..." go-to has been wearing thing for years since the advent of Steam on Linux.


      The Linux kernel has far outpaced the NT kernel, especially w/r to maintenance and upkeep. Why keep pouring resources into a lagging technology when you can use superiror, "self-updating" technology that is more or less subsidized by the entire tech industry that is standardizing around it?


      The future is LINUX and open standards....and always has been since the advent of the DARPANET/ARPANET , Unix, and FOSS in the late 70s and 80s. Sure...it was a slow, rough slog...but it was inevitable..despite the best efforts of IBM, Microsoft, Oracle, Sun, etc. So now the question is whether or not you will continue to bury your head in the sand because for whatever reason NT eventually being replaced by a Linux kernel bothers you.

  24. Avatar

    Pierre Masse

    Can't wait for Windows Lite.

Leave a Reply