This post is also available in: Italian
One recent announce by Microsoft was the bash support/integration in Windows 10: with the latest Windows Fast Ring update (14316) it’s possible run Bash and Ubuntu commands on Windows 10. This is the result of the partnership between Microsoft and Canonical.
To try this you must be part of the Windows Insider program, then you need to switch your Windows 10 system to the Fast Ring. You do this by going “System Settings > Advanced Windows Update options” and selecting your Insider Preview update setting to the far right.
Then you need to turn on Developer Mode via Settings > Update & security > For developers. Then search for “Windows Features” and choose “Turn Windows features on or off” and enable Windows Subsystem for Linux (Beta). To get Bash installed, open Command Prompt and type “bash”.
The result is that you can now run native Bash on Ubuntu on Windows in a complete Ubuntu 14.04.4 Long Term Support environment!
Note that the Ubuntu userspace is running not on a Linux kernel, but on Windows Subsystem for Linux (WSL). WSL provides the API hooks to look like Linux to Ubuntu and Linux applications, but it’s not the same thing. It’s something similar to the Subsystem for Unix (SFU) that was existing from several versions of Windows.
So nothing really new: SFU was too limited (no bash support, for example, only ksh), with WSL you have a full Ubuntu environment, so all script could be ported to the Windows. But they really should? For a developer perspective maybe: you can choose your dev environment, but honestly a GNU developer will never use a Windows client do build or test his script? Maybe not.
And note that you cannot use this environment for non scripting or interpreted programs, because you don’t have a complete POSIX.1 environment (you are not running a Linux kernel, so several system call cannot be implemented easy), but only a POSIX.2 compatible environment.
And for admin or ITpro? Do you really need to use bash when you already have a much powerful shell called PowerShell? Also bash it’s just an interpreter that use a lot of external commands: but most of them are design for a Unix like environment. Yes, should be nice use command like find, cut, awk, grep, but of others like chmod, mount, passwd may become useless in a Windows environment. Script compatibility cross platform it’s, in my opinion, just a chimera.
I’ve not tried yet, but seems that the integration is good, but I have some doubts on it’s utility. And again, it’s nothing new: was already (but limited) possible with SFU, or also with project like cywin. Should be nice see if this WSL enable also a X-Server, considering that there are only few free for Windows, this could be a nice solutions to run graphical Unix programs on a Linux/Unix system and display the contents on a Windows client (X-Window is a complete client-server protocol and the X-Server could be use to remote some application, like with RDS).
So nice move, but I hope to see also PowerShell on Linux that could be much more useful, at least for admins, for a cross management user case.
This video from Build 2016 gives you more information and a demo of Ubuntu on Windows:
Of course all those beta version of Windows 10 features will be consolidated in the next major Windows 10 update: Windows 10 Redstone 1 (aka Anniversary Update).