Microsoft has demonstrated how it is building tools from multiple Linux distros directly into Windows.
Craig Loewen, program manager at Microsoft, showed off a new Windows Subsystem for Linux feature that allows users to chain together commands from different Linux distros and call them from inside Windows.
From the Windows command line, Loewen piped data output by a Windows command to openSuse and then into Ubuntu, before printing the result.
"In under a second I've run a Windows executable, I've fed that into one distribution of Linux and then taken that output and fed that into another distribution of Linux, which is pretty amazing," he said.
The chain of commands was relatively simple, taking the output from Windows ipconfig command, piping that to the grep tool in openSuse to select lines with the string 'IP' in them and then sending these to the lolcat command in Ubuntu to change the color of the text, as seen below. These particular tools are also available across different Linux distros, rather than being specific to Ubuntu or openSuse.
But by allowing users to use a variety of Linux software side-by-side inside Windows, Microsoft appears to be attempting to offer developers the best of both worlds, to let them use their tools of choice, whether they run on Windows or a particular Linux distro.
The Windows Subsystem for Linux (WSL) is already available to those testing early builds of the OS under the Windows Insider Program and will be launched for everybody else in Fall this year.
The subsystem also allows Windows users to install Linux distros from the Windows Store, giving them access to apps for Ubuntu and openSUSE, with Fedora due soon, and other distros due to be added over time. These apps provide access to the Bash command line running on top of these Linux distros, rather than a full graphical desktop.
Loewen also demoed the ability to run multiple Linux distros side-by-side in Windows, showing windowed versions of Ubuntu and openSuse Leap 42 searching for the website generator jekyll using their respective package managers, as shown below.
WSL allows native Linux ELF64 binaries to run on Windows, translating Linux system calls into calls that can be handled by the Windows kernel.
As well as allowing users to run Bash tools and commands inside Windows, WSL also allows Windows software and files be called from Bash.
However, the commands and software supported by the WSL apps are still limited compared to a full Linux install. Notably, Microsoft doesn't support desktop environments or graphical applications within the Windows Store Linux apps. These apps are also not suitable for running production workloads, for example an Apache server supporting a website, according to Microsoft.
There are alternative ways to use Linux software inside of Windows, such as running a Linux distro inside a VM or running software from Cygwin. Each has their pros and cons, for instance, VMs come with a performance overhead, as well as requiring storage space, while binaries need to be modified and recompiled to run on Cygwin.
The availability of WSL coincides with a shift in Microsoft's rhetoric towards open-source software. While Microsoft's then CEO Steve Ballmer described open-source software as a cancer in 2001, in 2014 Microsoft CEO Satya Nadella declared that "Microsoft loves Linux".
The Free Software Foundation Europe, has previously said Microsoft's gradual acceptance of Linux is a compliment, and a net gain for the Free Software movement.
Read more on Windows 10...
- Windows 10: The smart person's guide
- Windows 10: Five reasons to stick with Microsoft's flagship OS
- Windows 10: Five reasons to avoid Microsoft's flagship OS
- Windows 10: The 10 biggest controversies and surprises in 2016
- 20 big changes coming to Windows 10 in 2017
- Windows 10 Cloud: Could this mystery OS be Microsoft's answer to Chromebooks?
- Windows 10: Microsoft promises updates will soon be smaller and easier to delay
- Windows 10 Anniversary Update: Watch out for these nasty surprise
Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.