Arthur Posted March 30, 2016 Posted March 30, 2016 Source: Ars Technica Microsoft built a Linux subsystem for Windows for Project Astoria, its system for running Android apps on Windows 10 Mobile. But in February the company confirmed that Astoria was dead, as it rather undermined the Universal Windows Platform concept. At the time, we speculated that portions of Astoria might live on, as portions of it had mysteriously started showing up in Windows Insider Previews. And today, that has come to pass, with Microsoft saying that the Windows 10 Anniversary Update will include the ability to run the popular bash shell from Unix, along with the rest of a typical Unix command-line environment. We're still trying to get the inside story on what Microsoft has done here, but what we've known for several months now is that the company has developed some Windows kernel components (lxcore.sys, lxss.sys, presumably standing for "Linux core" and "Linux subsystem," respectively) that support the major Linux kernel APIs. These components are not GPLed and do not appear to contain Linux code themselves; instead, they implement the Linux kernel API using the native Windows NT API that the Windows kernel provides. Microsoft is calling this the "Windows Subsystem for Linux" (WSL). A kernel API is one thing, but to be useful you need user mode applications. For Astoria, this would have been a version of the Android Open Source Project, Google's mostly BSD-licensed code that provides a Java-like runtime and various applications and system services. For WSL, however, Microsoft is turning to Canonical, creators of Ubuntu, for help. Canonical has provided a system image containing the Ubuntu versions of the various command-line tools that are typically found in a Linux distribution. Our understanding is that these are not recompiled or ported versions of the programs (as are used in tools aiming to provide a Unix-like environment on Windows such as Cygwin) but instead unmodified programs. Microsoft is describing this in terms of providing a Linux-like command-line environment at the moment, but from what we can gather, there's little fundamental restriction to this, potentially opening the door to running a wide range of Linux programs natively on Windows. This is far from the first time that Windows has been able to masquerade as a Unix-like operating system. From its inception, Windows NT included something called the POSIX subsystem, offering an environment minimally supporting the standardized version of the Unix APIs. A third-party offering called Interix greatly extended this with a wide range of common Unix command-line tools. Microsoft bought Interix, rebranding it first as Services For Unix (SFU) and then Subsystem for Unix Applications (SUA). In one way or another, this Unix-like mode was supported up until Windows 8; Windows 8.1 removed it. Whatever their names, these various subsystems suffered primarily from appearing to software as yet another Unix variant. They contained subtle differences from the POSIX support found in both FreeBSD and Linux, and they didn't provide the various non-standard extensions found in those kernels. This meant that porting applications to compile and run correctly was challenging. This time around, things could well be different, though the proof of the pudding will be in the eating. We can't wait to give it a spin and poke around under the hood. 1
Arthur Posted March 30, 2016 Author Posted March 30, 2016 More info... http://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.html "Right, so just Ubuntu running in a virtual machine?" Nope! This isn't a virtual machine at all. There's no Linux kernel booting in a VM under a hypervisor. It's just the Ubuntu user space. "Ah, okay, so this is Ubuntu in a container then?" Nope! This isn't a container either. It's native Ubuntu binaries running directly in Windows. "Hum, well it's like cygwin perhaps?" Nope! Cygwin includes open source utilities are recompiled from source to run natively in Windows. Here, we're talking about bit-for-bit, checksum-for-checksum Ubuntu ELF binaries running directly in Windows. [long pause] "So maybe something like a Linux emulator?" Now you're getting warmer! A team of sharp developers at Microsoft has been hard at work adapting some Microsoft research technology to basically perform real time translation of Linux syscalls into Windows OS syscalls. Linux geeks can think of it sort of the inverse of "wine" -- Ubuntu binaries running natively in Windows. Microsoft calls it their "Windows Subsystem for Linux". (No, it's not open source at this time.) Oh, and it's totally hot! The sysbench utility is showing nearly equivalent cpu, memory, and io performance.
CyberNerd Posted March 30, 2016 Posted March 30, 2016 so it's not linux at all? just userspace bash stuff to get some developers back from osx/linux ?
halbaradkenafin Posted March 30, 2016 Posted March 30, 2016 so it's not linux at all? just userspace bash stuff to get some developers back from osx/linux ? Apt-get as well. It's pretty much aimed right at devs and trying to push the "you can dev pretty much anything on a win 10 machine" angle.
Arthur Posted March 30, 2016 Author Posted March 30, 2016 so it's not linux at all? Just like OS X with Homebrew/MacPorts or Debian GNU/kFreeBSD.
psydii Posted March 31, 2016 Posted March 31, 2016 (edited) They really are starting to deliver on many of the early promises of the NTKernel with Windows10. Where the FSF like to use the term GNU/Linux, this is Ubuntu's GNU/NT (/BSD /Hurd flavours exist too). This is a full blown NT subsystem, like OS/2, POSIX or Win32. I wonder if how/if they managed to not use any actual GPL Linux kernel code in lxcore.sys. This for me is huge. No more student VMs for Computing/coding. They can have VS for GUI and the Linux subsystem for rest of the toolset. It will be interesting to learn how MS handle the differing capabilities of root/Adminstrator/'NT System' A final thought: this opens up Windows to pretty much all the Linux ecosystem vulnerabilities. I wonder if they will force a scheduled apt-get update all by default? Edited March 31, 2016 by psydii
disk Posted April 1, 2016 Posted April 1, 2016 I would imagine that the addition of code will open Windows to some vulnerabilities that it otherwise would not have been susceptible to, however, I imagine that this will be one of those components that you need to go into Programs and Features -> Turn Windows Features on or off, in order to install the feature. So only those who turned it on will have to worry about those updates (which I'm also sure will be patched regularly through Windows Update).
mavhc Posted April 1, 2016 Posted April 1, 2016 They really are starting to deliver on many of the early promises of the NTKernel with Windows10. Where the FSF like to use the term GNU/Linux, this is Ubuntu's GNU/NT (/BSD /Hurd flavours exist too). This is a full blown NT subsystem, like OS/2, POSIX or Win32. I wonder if how/if they managed to not use any actual GPL Linux kernel code in lxcore.sys. Software had to be recompiled for the Unix subsystem, but not for this, wonder why. This for me is huge. No more student VMs for Computing/coding. Interesting, what were they using VMs for?, what courses?
CyberNerd Posted April 1, 2016 Posted April 1, 2016 Software had to be recompiled for the Unix subsystem, but not for this, wonder why. Interesting, what were they using VMs for?, what courses? I gather it's more like WINE and it's (not?!) emulating the linux kernel. We used some linux vm's for A level computing (there is a linux module) and it's also useful for python programming.
Arthur Posted April 7, 2016 Author Posted April 7, 2016 Windows 10 build 14316 is now available. This includes bash. https://blogs.msdn.microsoft.com/commandline/2016/04/06/bash-on-ubuntu-on-windows-download-now-3
Arthur Posted June 9, 2016 Author Posted June 9, 2016 I gather it's more like WINE and it's (not?!) emulating the linux kernel. You might find this article interesting... https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-calls/ WSL executes unmodified Linux ELF64 binaries by emulating a Linux kernel interface on top of the Windows NT kernel. One of the kernel interfaces that it exposes are system calls (syscalls). This post will dive into how syscalls are handled in WSL.
CyberNerd Posted June 9, 2016 Posted June 9, 2016 You might find this article interesting... https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-calls/ Indeed. I see W10 preview will run Docker images natively now: Windows 10 Insider Preview Build 14361 for PC and Mobile now available in the Fast ring which begs the question about why anyone would develop for windows anymore if you can develop for a (linux) Docker container and run it in Linux,OSX, Windows ?
Ephelyon Posted June 9, 2016 Posted June 9, 2016 Docker is meh. I had a protracted love affair with FreeBSD last summer. BSD jails FTW!!! I am trolling. Do not feed me.
unixman_again Posted June 9, 2016 Posted June 9, 2016 The question I have is why are they putting it on the desktop o/s rather than the server o/s? It might be fun for Joe Public to fiddle with Bash on the desktop o/s, but if it were on the server o/s, we sysadmins could use it for something useful.
CyberNerd Posted June 9, 2016 Posted June 9, 2016 The question I have is why are they putting it on the desktop o/s rather than the server o/s? It might be fun for Joe Public to fiddle with Bash on the desktop o/s, but if it were on the server o/s, we sysadmins could use it for something useful. Sysadmins might realise they don't need windows servers. 1
mavhc Posted June 9, 2016 Posted June 9, 2016 Microsoft doesn't even want you to buy Windows Server, according to their price changes and talks about how paying them for Azure per second is so awesome.
Arthur Posted July 3, 2016 Author Posted July 3, 2016 (edited) The question I have is why are they putting it on the desktop o/s rather than the server o/s? Because developers use desktop OSs. https://brianketelsen.com/i3-windows If it works, it has the potential to win back many developers who abandoned the Windows platform years ago because of the inability of Windows to deal with the *nix world. The huge popularity of Ruby, Python, Redis, and dozens of other *nix first tools that were born in *nix. Some of these tools, like Ruby, have Windows installers, but Windows is an afterthought and second-class citizen at best. Many developers (like me) started using Windows but moved to Mac or Linux operating systems over the years as it became increasingly hard to write software in Windows. [Opinion] Linux isn’t the best place to work 100% of the time. Office applications are lacking compatibility and features. There is no decent email client for Linux. Save your apologist comments and what about Open Office/Geary/Thunderbird comments. If you’ve used them, you know that they’re not as nice as the applications available in macOS and Windows. [Opinion] macOS is slipping in quality, and falling behind in features. I’ve grown increasingly frustrated over the past 3 years using OS X as my daily driver. Frequent crashes and very poor QA from Apple have lead to an operating system that used to be amazing becoming less so at each release. I used to be a dyed in the wool Mac zealot. Apple eroded my confidence in their operating system to the point that macOS is now where I go to do emails and other administrative tasks, but I do daily development on an Arch linux desktop sitting next to my MacBook Pro. Worse, although macOS is UNIX compliant and has an almost-*nix like environment available, far too many things don’t work in macOS that are required for modern Internet software development. The hacks that we’ve put up with over the years are a testament to how poor Linux is for administrative work and how nice macOS was for the same. Given this set of circumstances and opinions, I was more than a little excited when Microsoft announced WSL. It promised to give developers what could be the best of all worlds. A modern and capable desktop operating system – Windows 10 – with all of the quality features and support for modern hardware that we would expect. AND a real installation of Ubuntu Linux running along side of it. Not virtualized, running in Virtual Box or Parallels Desktop or VMWare, but right there on my laptop running at native speed. The idea has real promise. So when I got a new Dell XPS 13 Developer Edition (Ubuntu Pre-installed) the first thing I did was put the latest version of Windows 10 Insider Edition on it. Over the course of a day it updated to Build 14379, which is the latest as of July 2, 2016. I had tried previous builds, but found simple things like git or zsh didn’t work well. Imagine my surprise when I installed Bash for Windows on this build and pretty much everything worked. I cloned my dotfiles and ran the post-install scripts that install i3 window manager, neovim, zsh, Go, and all the requisite development tools that I’m used to. Nothing failed. (I didn’t try running i3 yet, because I knew there was no X server installed) Nothing Failed Edited July 3, 2016 by Arthur
mavhc Posted July 3, 2016 Posted July 3, 2016 [Opinion] Linux isn’t the best place to work 100% of the time. Office applications are lacking compatibility and features. There is no decent email client for Linux. Save your apologist comments and what about Open Office/Geary/Thunderbird comments. If you’ve used them, you know that they’re not as nice as the applications available in macOS and Windows. Really, people still use desktop apps? Could do with a good GUI for Windows though, but X11's WM system is too limited, which is why KDE and Gnome were invented. Hopefully someone writes an integrated XServer for Windows.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now