Wow! I knew Microsoft was seriously getting its act together, but their latest move is the most impressive yet.

You can read the reports here and here and here, but the basic story is clear from just the headline.

Bash on Windows

Microsoft just announced that Linux non-graphical programs will now run on Windows. This of course includes the main interface to Linux, the Bash shell. It also means all the other Unix tools that Linux and Mac users take for granted. This is huge news.

Basically this is like Wine but in reverse. Wine, started in 1993(!), is a recreation of the functionality of Windows system calls for Linux. So when a C program calls a standard function, for example, fopen() to open a file, the OS, which actually manages files and memory and processes and such, answers the call. Obviously the Linux kernel and the Windows kernel do things differently and Wine is a way to translate what a program is expecting from Windows into proper Linux calls. But this thing they’re showing does the reverse. When a Linux program (like Bash but it applies to all) runs on Windows, apparently this new Microsoft thing converts what Linux programs expect into the system calls appropriate for a system managed by Windows.

Of course there are still questions like, why can’t the open source Bash just be ported properly to native Windows? This question implies the real question — are there fundamental deficiencies in the Windows kernel that make full Bash functionality difficult? But hey a reverse Wine for Windows is still a great thing and will no doubt be very useful and make Windows a much more plausible system to use.

And if that’s not enough for one day, Microsoft is also releasing an extension to Visual Studio that allows C++ code to (cross?) compile for Linux machines. I’m guessing these things are related. Still, this is a pretty huge deal.

At this point if Microsoft releases a DirectX library for Linux (go ahead and charge for it, it’s good stuff), then Linux and Microsoft are suddenly on the same team. This is a great victory for Microsoft and an even greater one for Linux.

UPDATE: Here’s even more on this confirming my conjectures about what exactly this new feature is. It also mentions some of the things that don’t work which are related to the deficiencies in Windows I mentioned. Still, it will be very interesting to see how this develops.