In more recent news, a beautiful union of Windows and Linux! Lindows
So Lindows was recently announced and released in the preview version. How Lindows will be?
During Microsoft’s Build developer conference last week, they had announced that they were working on a “Windows Subsystem for Linux”. I’m calling it “Lindows” cause why the heck not? Windows Subsystem for Linux is such a drag, and anyone not tech-savvy would not understand WSL, so Lindows is probably the best workaround. Now there has been some discussion on exactly what they mean by a Linux subsystem, will it be using a pseudo-Linux command line but everything is actually being done by PowerShell translated into a Linux environment? Or is it just an internal VM (even with my lack of knowledge, I knew that wasn’t the case… cough cough Hyper-V). However, it appears that since Project Astoria was killed in February (codename for Microsoft technology to build Windows apps for phones, by reusing Android code) that there were some secret secret know hows and doodads were happening beneath the covers, and it seems just that!
It turns out that Microsoft had been developing Windows kernel components, which have been likened to Linux kernel APIs but with a slight difference in that they are not Linux code themselves, but instead the native Windows NT API implementing the Linux kernel API on top of that!
It appears that Microsoft has turned to the creators of Ubuntu to implement a system that is similar to Ubuntu with the same various command-line tools that are found in Linux distros (such as APT-GET YESSHH YYAAASSSS SLAY). Reading through a variety of articles and reddit conversations, it seems that these are all native Unix-like tools in unmodified programs on a Windows system. So they are not recompiled or ported versions. As a result, users will be able to natively load linux executables and libraries to be used. It appears that “bash.exe” calls upon the Linux bash through some subsystem magic and walakazoo and passes some parameters as a part of that. This then appears to cross process communication with Linux with standard pipes. Now many have been skeptical and critical thinking that it just ported Linux, but NOPE. A complete Linux environment that runs on a Windows system! HOW CRRAAAZZZZYYY!
Did you get that?!? Don’t worry, it took me a few laps around that track, before I fully comprehended it when I first heard such crazy talk a few months ago 🙂
Here’s let’s break it down slowly…
- Windows 10 users
- Can open the Windows Start menu
- And type “bash” [enter]
- Which opens a cmd.exe console
- Running Ubuntu’s /bin/bash
- With full access to all of Ubuntu user space
- Yes, that means apt, ssh, rsync, find, grep, awk, sed, sort, xargs, md5sum, gpg, curl, wget,apache, mysql, python, perl, ruby, php, gcc, tar, vim, emacs, diff, patch…
- And most of the tens of thousands binary packages available in the Ubuntu archives!
For those interested, but not familiar with Linux and Bash, here is a highly recommended guide that I used as well!
Supporting Linux apps in Windows is a significant move for a company that has spent decades promoting its own APIs and application platform, and it’s unlikely that the company would make such a move just to provide a few creature comforts to developers. The need goes deeper than that.
So not a VM? NOPE! Not a VM at all, no Linux kernel booting, just the Linux user space! It appears to be a in subdirectory of the main Windows kernels that are “/mnt”. Catch that? The Linux “mnt”? WE GET TO MOUNT IT LIKE LINUX. HECK YEA. Well honestly, not too excited because I hated command line mounting and I never got the alternatives to work with automatically mounting. But looking through the developer notes, all of the Windows drives, like the common C: and D: are mounted read/write directly under “/mnt” which is essentially the new “User/Home” directories.
Not Ubuntu in a container either! Native binaries from Ubuntu running directly in Windows. Only reason I say Ubuntu is because Windows is using that framework, package repository etc. It’s not a Cygwin either! Cygwin includes open source utilities to be be ported and run on Windows, but Windows is saying a bit-for-bit, checksum-for-checksum ELF binaries running on Windows.
SSH works. Apt-Get works. Most things work and only a few imperfections!