Culture

Microsoft Plants Bash on Windows 10, Freaks Everyone Out

1 Apr 2016 10:54am, by

Hell Freezes Over,” screamed a headline at PC World, anticipating just how stunned the geek world was at Wednesday’s news that Microsoft will provide a Ubuntu Linux binary in upcoming versions of Windows 10. Then Microsoft spent the rest of the week convincing the world that it was true — with videos, tweets, blog posts, and even an outreach effort on Hacker News.

“You asked us to help you in be more productive, and we listened,” explained Kevin Gallo, the vice president of Microsoft’s Windows developer platform, speaking Monday at Microsoft’s Build 2016 conference. “We will continue to invest in making Windows home for developers, regardless of which platform you build for.”

 

For the general public, it will be arriving with the third stable build of Windows 10, to be released this summer in the Windows 10 one-year anniversary update, codenamed “Redstone 1.” The latest build is already available through the Windows Insider program. “Starting today, developers in the Windows Insider Program can access the Windows Anniversary SDK Preview to explore the new features,” announced Microsoft’s Executive vice president for Windows, in a blog post.Developers react to Microsoft announcing Bash in Windows 10

Microsoft CEO Satya Nadella hinted about the news during the first-day Build keynote. “We’re also going to talk about how Windows is your ultimate dev box,” Nadella told the audience, “where you can do all your application development for Windows and beyond right there on a Windows PC.”

But the real details came from Gallo later in the day, when he announced the venerable Gnu Bash shell would be coming to Windows.

“We know that every innovation and step forward with Windows is only as powerful as the ecosystem that rallies around it,” he explained. “When we talked to web developers they still struggled with using Windows as their primary dev box, as many of them have workflows which rely on open source command-line tools, scripts, and frameworks. We’re going to fix that so that Windows can be your home.”

Windows-Bash-02

His announcement was followed by what seemed like stunned applause, and some scattered cheers. Then he wowed the crowd by executing familiar bash commands like ls and cd.

“And of course, my favorite editor is Emacs,” he said to more scattered applause, “so I’m going to use Emacs. But you can use any of your favorites. They’re all there…”

Microsoft's Scott Hanselman. Photo from TNS.

Microsoft’s Scott Hanselman.

“This isn’t Bash or Ubuntu running in a VM,” further explained Microsoft principal program manager Scott Hanselman, in a follow-up blog post. “This is a real native Bash Linux binary running on Windows itself. It’s fast and lightweight, and it’s the real binaries. This is a 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.”

Wait, What?

Then the shockwaves began to ripple through the rest of the world. “I haven’t been this excited in years,” read a comment left on Gallo’s blog post. “As a long time MS developer, it is deeply satisfying to see the company vigorously defend its vision for a unified and more stable platform.”

But the strange new camaraderie between Linux and Windows seems to have surprised even the people who were working on it. Dustin Kirkland, part of Canonical’s Ubuntu Product and Strategy team, shared his experience as a “sponsored guest” at the event. “That’s perhaps a bit odd for me, as I hadn’t used Windows in nearly 16 years.”

And the feeling seems to have been mutual. “Eating lunch with folks from @Canonical at #Build2016,” read a tweet from Jacob Rossi, an engineer on Microsoft’s Edge browser. “Never thought I’d have that experience at Microsoft!”

To spread the news, Microsoft engineers started appearing in the comments on Hacker News. One user named “bitcrazed” identified himself in his profile as a senior program manager on the Windows team at Microsoft. He touted that the company was “Making the Windows command-line cool again!”

“Honestly, seems like all roads here lead to Microsoft swallowing Linux userbase whole,” one user had posted.

“I’ve already played with workflows where I’m running vim inside of Bash on Windows to edit PowerShell scripts that I’m executing in a separate PowerShell prompt” — Microsoft project manager Joey Aiello.

“Swallowing? No. Supporting, yes!” bitcrazed responded. “We want Windows to be your home — the best place to build apps for all the platforms and all the devices. Period. In case you’ve not noticed, this is a very, VERY different Microsoft, one I re-joined recently precisely to work on this very feature!”

“Want to make this absolutely clear — this is a command-line only toolset for developers,” he posted later. “It is not built to support GUI desktops/apps. It is not built to run production Linux server workloads. It is not suitable for running micro-services or containerized environments.

“Again — this is A COMMAND-LINE-ONLY DEVELOPER TOOLSET!”

But Is It Linux?

There was, of course, a lively debate on Hacker News about whether this really counted as Linux

“Yes, technically Linux is only the kernel and technically running the Ubuntu run-time on a different kernel isn’t running Linux,” one user noted. “However, ‘Linux’ is almost always a reference to GNU tools and the Linux Kernel.”

And bitcrazed joined in again, suggesting in the future Windows could support more than just the Ubuntu version of Linux. “[T]he Windows Subsystem for Linux (WSL) is build to be distro-agnostic. We picked Ubuntu in this first version due to its popularity with developers, but there are few technical reasons (other than us fully and accurately implementing the necessary syscalls) why it shouldn’t support other distro’s userland environments in the future.”

“Importantly, WSL doesn’t ship with a distro,” he added later. “[W]e download a genuine Ubuntu userland image at install-time and then run binaries within it.”

Another Hacker News user suggested it might lure users to Windows, where they’d then fall in love with Microsoft’s command-line tool, PowerShell. Others seemed concerned about the future of PowerShell, prompting another Microsoft appearance in the comments, from a user identifying himself as Joey Aiello, Microsoft project manager for PowerShell. “First, just let me say, I’m a huge fan of Linux and can’t be more excited about Bash coming to Windows…,” he posted.

“Because it’s operating mostly in user mode today, Bash on Windows is much more suited to developer scenarios. I’ve already played with workflows where I’m running vim inside of Bash on Windows to edit PowerShell scripts that I’m executing in a separate PowerShell prompt. In fact, I can plug along fine in a PowerShell window, run a quick ‘bash -c ‘vim /mnt/c/foo.ps1”, make a few edits, and be right back inside my existing PS prompt. This really is just another (really freaking awesome) tool in your toolbox.”

“This might actually stop the exodus to OSX ive seen in the developer community,” posted another Hacker News user — a concern of which Aiello seemed well aware. Later he added, “Bash on Windows is awesome right now for developer scenarios, especially for folks coming from an OSX/Linux workflow…”

The Proof is In The Demo

“There is no smoke and mirrors here… ” added Russ Alexander as he launched into a demo. “We’ll make that abundantly clear.” At the Windows command prompt, Russ typed bash — and when he hit return, the next line displayed the familiar bash prompt.

Windows-Bash-01

He pointed out there’s also support for Ruby and Python, and ran through a series of iconic Linux commands:

“This is true magic,” commented one user on the video.

Bash’s standard tab completion feature was also functioning, making it faster to enter commands. Russ ran apt-get on Ubuntu and then explored the resulting directories using File Explorer. He compiled Ruby code in bash that had just been written in Windows using Microsoft’s Visual Studio Code. “There are gaps,” Russ cautioned. “There are syscalls that we have not done. There are things that we know do not work.” For example, MySQL, top, and many of the RubyGems. “We are trying to close as many gaps as we can,” he admitted.

Then they urged developers to provide feedback and promised support on Twitter, StackOverflow, and Serverfault.

Geeks React

But what’s most interesting has been the street-level reactions of geeks. “Checking calendar. Nope. Not April 1st,” posted one reader on Hacker News. And another began regretting their latest ad-blocking decision.

“Hahaha — I just used GRC’s Never10 tool to stop the constant annoying pestering to upgrade to Windows 10. Now, I’m not so sure anymore.”

And in the main discussion thread, there were several more pithy reactions:

“Clearly, the end times are upon us.”

“rm -rf /* now on Windows.”

“It’d be nice if they open-sourced it, so it wasn’t yanked away from under our feet one day :) ”

“I am inordinately happy about this.”

Over on Twitter, someone even began imagining a confused Windows 10 user trying to ask the command line, “How can I add the Start button back in?”

Microsoft’s Senior Program Managers Rich Turner began retweeting some of the surprised reactions — like the data analyst who tweeted “My coworkers and I are freaking out.” And he also re-tweeted another user’s complicated metaphor: “It’s like your mother’s jam on a breakfast table in the hotel. Still hotel, but feels better.”

Microsoft played along with the surprise in their tweets on the official Windows Developer feed. “Bash on @Ubuntu on #Windows10? This is not a drill!” they tweeted, linking to a video with senior program managers Rich Turner and Russ Alexander. It was soon being embedded in blog posts across the web, and within 24 hours it had racked up over 400,000 views

“We went completely crazy, and we decided to integrate Linux UserMode and Windows,” said Rich Turner in the video. “Yes, really. We’ve actually taken the Linux UserMode code from Ubuntu, and we built a subsystem into Windows, into the Windows kernel, to expose an interface that looks, to all intents and purposes, like Linux.”

Feature Image: Robert Gallo, speaking at Build. Other images from Microsoft, except where noted.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.