|Run Linux Binaries On Windows 10|
|Written by Mike James|
|Thursday, 31 March 2016|
It's Build 2016 and we can start to argue about the top announcement, but being able to run Linux binaries under Windows 10 must count for something. It is being headlined as "Run Bash on Windows" but it goes well beyond this. The question is why and what effect will it have on programmers?
There is nothing really new about Linux on Windows; various sub-systems have provided some Linux compatibility over the years. Microsoft's own support for Posix, for example, only failed because it didn't really do it well enough, and add ons like Cygwin have been a mystery to most Windows programmers. Basically Linux on Windows was a backwater full of problems.
Now we have a Linux subsystem built into Windows 10 and capable of running unmodified Linux binaries and this opens the floodgates.
The back story is that Microsoft decided to find a way to run Android apps on WIndows, project Astoria, and for this it needed implement a Linux subsystem - remember underneath Android is a fairly standard Linux Kernel. This project was cancelled, but the Linux subsystem seems to have lived on. The new(ish) Windows Subsystem for Linux (WSL) implements enough system calls to allow user space programs to run unmodified.
At this point accounts seem to place the emphasis differently.
Some say this is not a complete Linux on Windows, but just an attempt to run Bash. However, even if you just run Bash that is still a lot of Linux at your command. So much so that Microsoft partnered with Canonical to package the Ubuntu root file system into a Windows application package for the WIndows Store. So it looks as if Windows 10 will have WSL installed by default and the user can then opt to download and install the Ubuntu root file system complete with all of the usual Linux command line utilities.
Once installed the root file system will have access to your Windows file system via a standard mount - /mnt/c. From the Windows file system you can see the root file system in AppData/Local/Lxssrpptfs/.
To give you some idea of how much this is Linux on Windows you can use apt-get to install new Ubuntu packages - so this is much more than just Bash on Windows.
Take a look at it in action:
So where does this implementation of Linux on Windows stop short?
You need to keep in mind that this is a user mode subsystem and as such there are no special Linux drivers. This means you can start up X and work with a graphics-based UI. As long as you are happy to restrict yourself to the command line and don't want to access any additional hardware, then most things should work. However, it does appear that sockets are supported and so you can run a webserver from within WSL. Yes, it seems to support vim, emacs, apache, python, gcc, php and so on...
At the moment the only warning is that MySQL has "issues". It is amazing that MySQL runs at all at this early stage and this should give you some idea that we we have here is something like a Linux server inside Windows.
Notice that this means that you can run and develop new command line programs. If in the future the subsystem is enhanced to include graphics then presumably you would be able to run GUI based programs. There is no suggestion this would ever happen - but if it did why bother with Windows specific versions of Chrome or LibreOffice.
Why did Microsoft do any of this?
The stated reason is that it was understood that any Windows programmer working with the Web has to come into contact with Linux because most webservers are Linux servers. Being able to work with the Linux command line under Windows therefore makes some sort of sense, but not a lot. It means you don't have to learn PowerShell or Windows command line. However it doesn't make complete sense because PowerShell is much more powerful than Bash.
In addition, it seems that the WSL is more like having a Linux server embedded within Windows.
It will be interesting to see where users take this idea. At the moment the Microsoft part of the system isn't open source but it might be. If so there seems to be no reason why it could expand to become a complete Linux under Windows - now how strange is that...
Look out for the new feature in a Windows Insider update.
Ubuntu on Windows — The Ubuntu Userspace for Windows Developers
Microsoft Does U-Turn On Skype Universal App
Astoria Cancellation Confirmed - Devs Advised To Try Xamarin
Microsoft Buys Xamarin - About Time Too
Microsoft's Astoria Android Emulation Might Not Happen
Microsoft's Islandwood Now On GitHub - An iOS Bridge To Nowhere?
Silverlight Bridge To UWP Apps
Project Westminster - Another Web App Format
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook, Google+ or Linkedin.
or email your comment to: email@example.com
|Last Updated ( Thursday, 31 March 2016 )|