How Been Microsoft That The Console Linux Run on Windows 10?

Yesterday Microsoft surprised us with the news that everyone will soon be able run a Linux bash console natively on Windows 10. The property, which will be available for Windows Insiders in upcoming builds of Windows 10, can then activate so that those members of that community can evaluate it. In summer, that option will be extended to everyone with the arrival of the “Anniversary” update.

How does this feature work? Microsoft pointed out in the presentation, virtual for this option, and also container machines are not used. Microsoft took time preparing this movement, and its partnership with Canonical has made that we can access a singular way to run both bash and others directly and native Ubuntu binaries. The key: the call Windows Subsystem for Linux (WSL).

This is a native Linux on Windows, without further

One of the Canonical, explained it, among others, Dustin Kirkland, on his blog. There confirmed that not virtualization containers had nothing to do with this implementation, and neither had much to do with Cygwin, which until now was one of the most popular ways to do something similar to what has now been achieved on Windows 10.

As it indicated Kirkland, Cygwin makes use of binaries recompiled Linux to adapt and convert them into Windows binaries. As explained in the FAQ, the mainstay of this development is “the library that provides calls to POSIX system and environment these programs expect”.

What actually happens in Windows looks more to an emulator, Kirkland, explaining that what is done here is to “make a translation in real time of calls to Linux system calls to the operating system prompt Windows” pointed out. It is, said, something that could be considered the reverse of what it does wine, a project allowing precisely that they can run binaries of Windows in Linux systems.

The work done at Project Astoria was not vacant

In Ars Technica were a little further in explaining the origins of this technology, which It has an interesting predecessor: Project Astoria. The technology that would allow moving applications from Android to Windows 10 was abandoned by technical difficulties – but they focused otherwise – but part of the work was carried out for this project has served to give life to this support of the bash console on Linux.

what the hell? 10 14251 Windows has lxcore.sys and lxss.sys? aren ‘ t they part of Project Astoria? and for Mobile only?

— WalkingCat (@h0x0d) January 28, 2016

When Microsoft began work on this project he developed various components for the Windows kernel. He did it with lxcore.sys or lxss.sys, for example, two – when were they discovered, mysterious – components that allowed support to most of the Linux kernel APIs. Beware, because as they excelled in Ars Technica it components that do not have GPL-licensed (non Open Source) and in fact do not contain code from Linux: “instead, implement the API of the Linux kernel using the API native Windows NT that provides the Windows kernel”. And that is what they have finished baptizing as referred to Windows Subsystem for Linux.

Therein lies the difference with alternatives as Cygwin, since that mechanism of translation and execution of system calls that one can, in fact, work with applications and Linux ELF binaries natively (e) identical to that you would do in a “conventional” Ubuntu system. Canonical has provided a system image (now is Ubuntu LTS 14.04, but soon they will release the image with Ubuntu LTS 16.04) which contains, among other things, Ubuntu versions of several of the tools command line usually found in a Linux distribution.

Many advantages, but also some limitations

This subsystem allows to achieve a truly remarkable performance for the execution of Linux within Windows 10 applications. As noted Kirkland, as sysbench benchmarks indicate that the performance in this mode of execution is “almost equivalent” that would be obtained with a native Windows installation performance of CPU, memory and input/output systems.

This developer spoke to us of advantages as the power direct access to all units (our Windows 10 in direct system: each one is mounted in the traditional directory (/ mnt/c, /mnt/d, etc, but the reverse is also true, we can mount the entire filesystem of Ubuntu from Windows 10 files Explorer)). Access to other utilities like ssh and mentioned apt-get (wonderful, really) stand opens up really interesting possibilities for any Linux developer.

That, however, does not hide the limitations of this implementation. To start, should take into account that this is something which is developing and which will therefore that failure to appear when. There will be applications and tools that don’t work as they should, and Kirkland put examples known and great byobu, screen to tmux to console session management.

Even the own responsibility of Microsoft also warned to indicate that not all available tools and bash scripts will work. Also, they pointed out something important: This is a set of tools for developers “to help them write and develop your code for all scenarios and platforms”.

This is not a server platform that host web sites, run infrastructure server, etc. For such scenarios recommended use Ubuntu solutions in their services in the cloud (Azure). And finally also indicated that tools such as bash Linux may not interact with tools and Windows applications. “You can not run the Notepad from bash, or you can run Ruby bash from Powershell,” clarified.

In this log on to the Build 2016 video precisely gave important details on the workings of this system, as that support binary ELF that we were talking about and showing that we are running the same tools that we execute on a Ubuntu system installed natively:

We see support for other distributions, or even access to a graphical environment?

Many Linux users will surely be wondering if this kind of feature can go further in the future and support interesting options. For example, to other Linux distributions, something that at first seems feasible given the way of working of this subsystem of Linux which translates system calls.

Sorry: does not seem that we can have access to Unity or other window managers and desktop in that Ubuntu in Windows environments 🙁

Kirkland’s own description of how he prepared the image of Ubuntu so users of Windows 10 could use it on this OS certainly points to that many others could do the same. Here, that if, probably needs to reach agreements with Microsoft the Redmond company also distributed these images so that users who are not comfortable with Ubuntu and their tools or their package manager can do the same with other distributions with other tools and other package managers.

Another probably frequent questions is which affects graphic applications. We count with a graphical session or the execution of programs with its graphic user interface (GUI)? That seems less likely According to a user who spoke about it on Reddit and indicating that there are no plans to offer this option: “this is really aimed at developers, is not supposed to work as a virtual machine or a substitute for Cygwin”.

Too bad: it seems that it will not be possible (or at least easily) be able to run applications in environments such as GNOME or KDE. That had already been the lace, but of course what was achieved by Microsoft is then interesting and unthinkable a few years ago, do not you think?