Microsoft Bringing Native Bash Shell to Windows

Microsoft today surprised developers by announcing it was bringing the Bash shell -- long a mainstay tool for Linux-based development -- to Windows 10.

The news was delivered to audience applause by Kevin Gallo during the keynote address opening up the company's Build conference in San Francisco.

Gallo was talking about how hosted Web apps allow Web developers to bring their experience to the Windows Store, letting them leverage their Web investments while still getting access to native capabilities in Windows such as Cortana, Bluetooth, Ink and more.

"However, when we talked to Web developers, they still struggled with using Windows as their primary dev box, as many of them use workflows that rely on open source command-line tools, scripts and frameworks," Gallo said. "We're going to fix that, so Windows can be your home. So today, I am so excited to announce the Bash shell is coming to Windows. Yes, the real Bash is coming to Windows.

"This is not a VM, this is not cross-compiled tools, this is native Ubuntu Linux binaries running on Windows through the magic of a new Windows subsystem," Gallo continued. "We partnered with Canonical, which developed this great console experience, which you'll be able to download directly from the Windows Store. Inside of Bash, you have access to the native file system, VT100 support, SSH and all of your favorite command-line tools."

Gallo then proceeded to demo a faux banking app built with Ruby, in which he hit the Windows key and typed bash to bring up the new shell, from which he launched into an emacs session.

Launching into emacs from the Bash Shell in Windows 10
[Click on image for larger view.] Launching into emacs from the Bash Shell in Windows 10 (source: Microsoft)

Microsoft's Scott Hanselman provided more info on the new Linux capabilities, including user-mode Ubuntu Linux binaries, being baked into Windows 10, in a blog post published today.

"This is a new developer feature included in a Windows 10 'Anniversary' update (coming soon)," Hanselman said. "It lets you run native user-mode Linux shells and command-line tools unchanged, on Windows.

"It's fast and lightweight and it's the real binaries," Hanselman continued. "This is an genuine Ubuntu image on top of Windows with all the Linux tools I use like awk, sed, grep, vi, etc. It's fast and it's lightweight. The binaries are downloaded by you -- using apt-get -- just as on Linux, because it is Linux. You can apt-get and download other tools like Ruby, Redis, emacs, and on and on. This is brilliant for developers that use a diverse set of tools like me."

Coders will be able to try out the "early developer experience" in an upcoming Windows 10 build, Hanselman said. "Expect some things to not work early on, but have fun exploring and seeing how bash on Ubuntu on Windows fits into your developer workflow!"

Judging from the audience reaction, the move struck a chord with many developers. It certainly did so with IDC analyst Al Hilwa.

"As a native and hard-core shell-script developer from the late 80s, having Bash come natively to Windows is a pleasure cruise down memory lane ... fills me with hope that I may have a Web developer career after my analyst career is over, without learning new scripting tools!" Hilwa said in an e-mail to ADTmag.

The surprise Bash announcement was just one of many new tidbits announced by Microsoft during the opening day of the Build conference. You can read more about the new development in our sister publications Visual Studio Magazine and Redmond Magazine. You can also watch a replay of the keynote address at Microsoft's Build site.

About the Author

David Ramel is an editor and writer for Converge360.