Developers

Microsoft Becomes Master of Its Own Linux Kernel

Microsoft this week announced that its own full Linux kernel will power WSL2, the newest version of the Windows Subsystem for Linux (WSL).

This marks the first time that Microsoft will include the Linux kernel as a component in Windows. Microsoft also introduced a Windows command line terminal that will add functionality to PowerShell and WSL.

Both the in-house custom-built Linux kernel for WSL2 and the Windows command line terminal are intended primarily for developers.

“This is a strong move in the battle against AWS more than anything,” remarked Joshua Swartz, principal in the digital transformation practice at management consulting firm A.T. Kearney.

Microsoft’s future is not the desktop market — though, of course, the company will continue to protect its ground there, he told LinuxInsider. Its future is the cloud market, which certainly could include desktop components in the future.

What WSL2 Does

WSL2 is the newest architecture for the Windows Subsystem for Linux. It enables dramatic increases in file system performance and full system call compatibility.

Improved functionality is among the top requests from the WSL community. Users can run more Linux apps in WSL2, such as Docker and FUSE, according to Craig Loewen, program manager for the Windows Developer Platform.

WSL2 handles file-intensive operations like git clone, npm install, apt update, and apt upgrade. The actual speed increase depends on which app is running, and how it interacts with the file system, he explained.

Initial tests showed WSL2 running up to 20 times faster than WSL1 when unpacking a zipped tarball. It also showed a performance boost of about two to five times faster when using git clone, npm install, and CMake on various projects.

Potential to Gain Developer Trust

Essentially, Microsoft stands to gain the appreciation and trust of the developer community by building its own Linux kernel version to run its WSL2 processes, said Cody Swann, CEO of Gunner Technology.

“Outside of strictly Windows development, writing cloud apps (mobile, Web, etc.) on a PC has been a miserable experience, and developers have been forced to dual-boot a Linux distro aside from the Windows OS anyway. Microsoft is acknowledging and offering a solution,” he told LinuxInsider.

Swann noted that the introduction of an in-house Linux kernel will likely have little impact on consumers. However, it does open the door for more integrated connections between Microsoft services and the Linux operating system.

“I think [Microsoft] is happy with Windows for consumers but needed to do something for developers,” he said.

Building its own kernel “is an acknowledgment that Microsoft realizes the importance of Linux to Microsoft’s ecosystem,” Swann continued. “I could see their teams building in deep integrations in future releases of Windows.”

It is a really smart play from Microsoft, he said, as it “will let them extend deeper into the developer community by leveraging a product someone else — open source community — is building,” said Swann.

Welcome to the New Microsoft

The shift toward building and maintaining a “for Windows” Linux kernel reflects CEO Satya Nadella’s commitment to open-source development. This is no longer the Microsoft of Ballmer and Gates, where everything is kept behind a proprietary fence of like tools and products with no interoperability, said A.T. Kearney’s Swartz.

“Satya has completely transformed that into a more contemporary platform, and that strategy has paid off in spades. Hello, trillion-dollar valuation,” he quipped.

The two biggest benefits for Microsoft are efficiency and security, according to Charles King, principal analyst at Pund-IT.

“By leveraging its own substantial development assets and tools, the company’s customers can be assured that the kernel remains fully current and is tempered with the latest security patches and fixes,” he told LinuxInsider.

Gain for Devs, Too

Linux binaries use system calls to perform many functions, such as accessing files, requesting memory, and creating processes. Microsoft’s Loewen noted that WSL1 relies on a translation layer that interprets many of these system calls and allows them to work on the Windows NT kernel.

The challenge involves implementing all of the system calls. That results in some apps being unable to run in WSL1, he said. WSL 2 introduces a whole new set of apps that run inside of WSL.

The new architecture lets Microsoft get the most recent improvements to the Linux kernel much faster than in WSL1. Microsoft can update the WSL2 kernel rather than having to re-implement the changes.

“WSL2 will be a much more powerful platform to run Linux apps on and will make it possible to do more with a Linux environment on Windows,” Loewen maintained.

Fully Open Source Tool

The development of Microsoft’s own Linux kernel is the culmination of years of effort from the Linux Systems Group as well as multiple other teams across Microsoft, according to Jack Hammons, program manager of the Linux Systems Group at Microsoft.

He said the kernel provided for WSL2 will be fully open source, and Microsoft will provide instructions for creating one on GitHub. The company will also work with developers interested in contributing to help get changes upstream.

Microsoft developers built WSL2 using the company’s CI/CD systems. The company will service the software through Windows Update in an operation transparent to the user, added Hammons. The kernel will stay up to date with the newest features and fixes in the latest stable branch of Linux.

“To ensure the provenance of our sources, we mirror repositories locally and continually monitor Linux security mailing lists and partner with several CVE database companies to help ensure that Microsoft’s Linux kernel has the most recent fixes and mitigations,” he explained.

Internal Upstream Mandate

Microsoft will ensure that all kernel changes go upstream — an important philosophy of Linux, said Hammons. Maintaining downstream patches adds complexity and is not standard practice in the open-source community.

He added that Microsoft’s goal in leveraging Linux is to be a good citizen and contribute changes to the community. To protect the stability of the Long Term Support branches, some patches—such as new features—might be included only in future versions of the kernel rather than back-ported to the current LTS version.

When the WSL kernel source becomes available, it will consist of links to a set of patches in addition to the long-term stable source. Over time, Microsoft hopes this list will shrink as patches make it upstream and grow as new local patches are added to support new WSL features, Hammons added.

Building a Better Window Box

Microsoft also announced the upcoming Winter release of Windows Terminal, a new terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL.

Windows Terminal

Windows Terminal


According to Kayla Cinnamon, Microsoft’s program manager for Windows Console, Command-Line, and WSL, Windows Terminal 1.0 provides many settings and configuration options that offer better control over the Terminal’s appearance and each of the shells/profiles that open as new tabs.

Settings are stored in a structured text file, making it easy to configure to create a custom-styled Terminal that is personalized to a user’s unique taste, she explained.

Rather than continuing to tweak the existing Windows Console, Microsoft decided it needed to take a new, fresh approach. Windows Terminal installs and runs alongside the existing in-box Windows Console application, Cinnamon noted.

How It Works

When a Windows 10 user runs Cmd/PowerShell/etc. directly, the process starts attached to a traditional Console instance. The new terminal’s configuration mechanism lets Windows users create multiple profiles for each desired shell/app/tool, whether in PowerShell, Command Prompt, Ubuntu, or even SSH connections to Azure or IoT devices.

These profiles can have their own combinations of font styles and sizes, color themes, and background blur/transparency levels. Users also have the option of selecting the new monospaced font to enhance the modern look and feel of the Terminal. This font includes programming ligatures and will be open sourced and have its own repository.

Key features include multiple tabs and beautiful text. Multiple tabs support is the most frequently requested feature for the Terminal, according to Cinnamon. Beautiful text is produced with a GPU-accelerated DirectWrite/DirectX-based text rendering engine.

It displays text characters, glyphs, and symbols present within fonts, including CJK ideograms, emojis, powerline symbols, icons, and programming ligatures. This engine also renders text much faster than the previous Console’s GDI engine.

Backward compatibility remains intact while providing the option of experiencing Windows Terminal when desired.

Timeline Revealed

Microsoft will deliver Windows Terminal via the Microsoft Store in Windows 10 and will update it regularly. This will ensure that users are always up to date and can enjoy the newest features and improvements with minimum effort, said Cinnamon.

Microsoft plans to launch the new terminal this winter. After Microsoft ships Windows Terminal 1.0, developers will start work on many of the features already on a backlog.

The Windows Terminal and Windows Console are now available as open source on GitHub.

This summer, Windows Terminal previews will be released to the Microsoft Store for early adopters to use and provide feedback.

What Might Come Next?

It is a bit of a stretch to think that Microsoft will use its in-house Linux kernel for other purposes, such as developing its own Linux distro.

That likely depends on whether Microsoft discovers sizable demand or discrete commercial opportunities arising from such an effort, noted Pund-IT’s King.

“For the time being, I expect the company will mainly focus on making Windows and Linux increasingly compatible and complementary,” he said.

The effort versus payoff would be considerable, suggested A.T. Kearney’s Swartz. If Microsoft were a brand new company starting from scratch today, then it probably would build everything on Linux.

“However, porting everything they have now to a Linux-native architecture would be costly and painful — and for little payoff. With this solution, Linux-lovers get their Linux, and the core Windows architecture remains intact,” he explained.

When Apple reinvented the Mac OS in 2000, it was built atop the BSD Unix OS — which is more like Linux than DOS, which is what Microsoft Windows is built atop, Swartz pointed out.

Maybe a Door Opener?

A Microsoft-built Linux kernel could open the door for more integrated connections between Microsoft services and the Linux operating system.

At heart, this effort signals Microsoft’s understanding that few, if any, of its core commercial customers prefer to live in a homogeneously Windows world, observed King.

“Instead, they prefer to use the heterogeneous technologies and systems that best suit their business requirements and use cases. Under the leadership of Satya Nadella, Microsoft has matured enough to recognize that point and is doing all it can to make customers’ lives easier, he said.

A more strategic question, said Swartz, is what new capabilities does this create for the Microsoft platform?

Azure, Microsoft’s cloud ecosystem, already has tremendous support for Linux. Windows previously had very good virtual machine support for Linux, he noted.

“The change now is that Linux processes will run natively on the Windows kernel, which means you get a much faster Linux experience than you did on the VM,” said Swartz. “I think it’s now bringing all the ‘industrial Linux engineers’ to the Azure table.”

Jack M. Germain

Jack M. Germain has been an ECT News Network reporter since 2003. His main areas of focus are enterprise IT, Linux and open source technologies. He has written numerous reviews of Linux distros and other open source software.Email Jack.

1 Comment

  • Given Microsofts long history of INSecure kernel releases, all in the name of "interoperability", why would anyone trust their Linux kernel?

    I for one will pass.

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

More by Jack M. Germain
More in Developers

What's your outlook for the business climate in 2025?
Loading ... Loading ...

Technewsworld Channels