Microsoft is changing. Once a closed, monolithic organization with open hostility towards open sourced software, they now appear to be embracing it.

Along with some recent changes in attitude, including open sourcing Visual Studio Code, Windows are starting to embrace Linux. The Windows Subsystem for Linux (WSL) was an integrated virtual version of Linux within Windows.

A new version of WSL is on the way, and for some people, it's going to change everything!

Why Would I Want Linux?

Linux Logo

At first glance, a Linux kernel within the Windows operating system might not seem too important. After all, if you already use Windows, why bother with Linux?

It turns out there are many reasons you might want to use Linux. Its stability and customizable nature makes it widely used across all forms of software development. Almost everything you see online and every app you use has a Linux server as its backbone.

If you are interested in open source projects and software, Linux as an operating system embodies this philosophy fully. There are free Linux equivalents of most pieces of software. If you are interested in development, open source projects are always looking for more contributors.

Is a particular piece of software not working the way you want it to? Then contribute to the project to make it better!

Doesn't Windows Already Have Linux?

Linux in the windows app store

Microsoft introduced the Windows Subsystem for Linux (WSL) with the 2018 Windows 10 Anniversary Update as a way to run Linux software in the Windows operating system.

Since then, installing a Linux distribution has been simple. Just head to the Microsoft Store, and choose from a selection of distributions.

Once installed, you can run the Linux command line straight from the start menu. This first iteration is now known as WSL 1.

Why Not Use a Virtual Machine?

Running other operating systems within Windows is nothing new. You can run almost any operating system with a Virtual Machine (VM), so why bother with WSL?

The difference an integrated system makes is speed and convenience. VMs typically run slower than native operating systems.

Since Linux operates natively within Windows, you can launch a Bash terminal from the start menu, and access your Linux subsystem in a matter of moments.

Compare this to the time it takes to spin up a VM or a dual boot of Linux and Windows, and you will see a real difference.

Still, WSL 1 has some caveats. Despite working faster than a typical VM, it remains a virtual operating system. WSL 2 changes this.

How Is WSL 2 Different?

Windows Subsystem for Linux

Windows Subsystem for Linux 2 (WSL 2) comes with an actual Linux kernel. Previously, Windows created an emulation of what the kernel does, and while it was highly optimized, it still wasn't as good as the real thing.

The difference the kernel is going to make will be huge. According to Microsoft, there is a 20x increase in speed between WSL 1 and 2. Even if this turns out to be somewhat exaggerated, it will still be an incredible difference.

The idea of Windows shipping a Linux kernel to run within the Windows operating system is a big deal. It signifies the ongoing attitude changes at Microsoft towards open source software and operating systems.

Why Is the Kernel Important?

The kernel is the lowest level of software on an operating system. It is responsible for almost every way you interact with your computer. For example, every time you use the software on your computer, it is the kernel which translates your input into data the CPU can understand, and feeds you the output back.

Shipping the Linux kernel changes everything, as it means that any Linux specific tasks you are performing will be interacting with the Linux kernel. This level of compatibility pulls WSL 2 away from the concept of a typical VM.

Explaining what the kernel is and what it can do is all well and good, but it still doesn't answer the question: why is this such a game changer?

Things You Can Do With a Kernel That You Couldn't Before

Logo for the popular Docker platform

Any file-intensive operations were a bottleneck for WSL 1, as Windows and Linux run different file systems.

Rather than making direct system calls, WSL 1 has to translate these calls into data Windows can understand.

With the Linux kernel in place, starting WSL 2 is significantly faster (demos show it booting in under two seconds). All of the previously mentioned speed issues are gone, as the operating system is running directly on the kernel.

Practical applications for this include running server solutions like Docker in a native Linux environment. This is a great benefit when developing for a remote Linux server.

Moreover, anything you would have typically used a full Linux system for will be possible within WSL 2, at near-native speeds.

Windows Terminal

WSL 2 will work hand-in-hand with another highly anticipated Microsoft project: the new Windows Terminal.

Designed as a complete reboot of using the command line on windows, Terminal's design is cross-platform by nature.

As well as running hybrid tasks within a single terminal window, the ability to use Powershell for Windows and Bash for Linux in different tabs of the same terminal window will change everything for cross-platform developers.

Should I Switch to Windows?

So far, we've looked at this from a Windows perspective, but what if you already run Linux? Should you make the switch?

In all likelihood, the answer is no. If you are already running Linux, then you won't see any benefits from switching now. Many Linux users prefer the fully open nature of the operating system.

Historically Microsoft hasn't been kind to open source projects, and that history is well remembered by many.

If you use both operating systems, WSL 2 will be a great addition to the Windows side of your daily use, and for developers using both platforms daily, it'll change everything about the way you can organize your workspace.

Operating the System

WSL isn't new news, but these changes are significant enough to turn some heads. It was possible to load a Linux Desktop in WSL 1, so it seems highly likely it'll be possible in WSL 2 also.

That said, if you don't like Microsoft and want to stay open source, this isn't for you. It would be understandable, and there are so many other great ways to stay open source!