Bash on Windows: Only the beginning of the Microsoft-Linux experiment

Microsoft is doing more than adding a native version of the Bash shell to Windows; it's paving the way for Linux development directly on Windows

Bash on Windows: Only the beginning of the Microsoft-Linux experiment
Credit: Microsoft

During the keynote presentation at today's Build conference, Kevin Gallo, VP for the Windows Developer Platform at Microsoft, announced what looks like the first step in a project to allow native Linux binaries to run as-is on Windows.

In partnership with Canonical, Microsoft will offer "native Ubuntu Linux binaries running on Windows," per the company. The binaries are not virtualized or cross-compiled to Windows, but run using a new subsystem that has inspired speculation and rumor ever since evidence of it surfaced earlier this year.

bash sm Image courtesy Microsoft

Microsoft claims Bash running on Windows is not done via a VM or cross-compiling the source code, but through a subsystem that allows Linux binaries to run as-is.

Gallo demonstrated the Bash shell -- a standard Linux offering -- running on Windows, as well as other common Linux command-line apps such as the Emacs editor and SSH. Dustin Kirkland reported that not everything works as expected -- the VT100 emulator, for instance -- but "they're getting close!"

Until now, Windows developers who wanted access to Linux command-line utilities and the software development toolchain had several options -- all with their flaws. The POSIX subsystem Microsoft supplied with Windows NT did little more than provide minimal compliance with certain aspects of some applications. Cygwin and Mingw are Linux tool sets cross-compiled for Windows with a POSIX emulation layer. While they cover the majority of use cases, there are exceptions.

Microsoft's new approach appears similar to previous projects to support Linux on Windows, such as Cooperative Linux and related projects like AndLinux. Those were all third-party efforts, however, not first-party, natively integrated solutions.

Deploying Linux apps on Windows is the first of many possibilities that could be enabled by this subsystem. Long-term plans could include using it to enhance cross-platform application development -- for instance, by allowing newly built Linux binaries to run as-is on Windows as part of their development and testing process.

From CIO: 8 Free Online Courses to Grow Your Tech Skills