Under the hood of Microsoft's Windows Subsystem for Linux

Bash on Windows 10 was one of the big reveals at Microsoft's recent Build conference. Since then, there's been a lot of speculation about what Microsoft did to make this possible.

Microsoft is starting to provide more details via blog posts and a new Channel 9 video on what's going on under the covers.

bashlinuxwin10

Spoiler alert: There's no secret Linux kernel hidden in Windows 10. Instead, it's the Windows Subsystem for Linux (WSL) that was developed by the Windows Kernel team is what provides the foundation that enabled the Linux binaries to run on Windows.

WSL includes a user mode session manager, pico provider drivers that emulate a Linux kernel and pico processes that host the unmodified user mode Linux, like Bash, as Microsoft officials explain in an April 22 blog post.

"It is the space between the user mode Linux binaries and the Windows kernel components where the magic happens," according to Microsoft's post."By placing unmodified Linux binaries in Pico processes we enable Linux system calls to be directed into the Windows kernel. The lxss.sys and lxcore.sys drivers translate the Linux system calls into NT APIs and emulate the Linux kernel."

The Channel 9 architectural overview video and the related blog post both note that the Windows kernel does include the Drawbridge pico process/pico driver concepts. And it's these pico processes and drivers that "provide the foundation for the Windows Subsystem for Linux."

The post and video are worth checking out for those whose hearts beat just a little quicker when they see an OS architectural diagram.

Microsoft is bringing the Bash shell to Windows 10

BashComingInWindows

Here is an announcement from Microsoft Build you probably didn’t see coming: Microsoft today announced that it is bringing the GNU project’s Bash shell to Windows. Bash (Bourne Again SHell) has long been a standard on OS X and many Linux distribution systems, while the default terminal for developers on Windows is Microsoft’s own PowerShell.

More importantly than bringing the shell over to Windows, developers will now be able to write their .sh Bash scripts on Windows, as well (or use Emacs to edit their code). Microsoft noted that this will work through a new Linux subsystem in Windows 10 that Microsoft worked on with Canonical.

“The native availability of a full Ubuntu environment on Windows, without virtualization or emulation, is a milestone that defies convention and a gateway to fascinatingly unfamiliar territory,” Canonical founder Mark Shuttleworth said in a statement today. “In our journey to bring free software to the widest possible audience, this is not a moment we could have predicted. Nevertheless we are delighted to stand behind Ubuntu for Windows, committed to addressing the needs of Windows developers exploring Linux in this amazing new way, and excited at the possibilities heralded by this unexpected turn of events.”

BashScreenshot

The idea here is clearly to position Windows as a better operating system for developers who want to target other platforms besides Microsoft’s own. Under its new CEO Satya Nadella, the company has quickly embraced the idea that it wants to target all developers and platforms — not just its own. While seeing Microsoft doing anything even remotely associated with a rival operating system like Linux was unthinkable only a few years ago, the company now offers support for Linux on Azure, has open sourced numerous of its technologies and even plans to bring its flagship database product SQL Server to Linux in the near future.

Bash will arrive as part of the Windows 10 Anniversary Update this summer, but it’ll be available to Windows Insiders before that. And looking ahead, Microsoft says it may bring other shells to Windows over time, too.

BashScreenshot2

Advertsing

125X125_06

MonthList

CommentList