Thursday, 31 March 2016

"...then you win"? Some Thoughts On Bash For Windows

If you have not seen it yet, take four minutes out of your life to watch the announcement that Bash is going to be natively supported on Windows 10. During the video you're probably going to notice some confused-looking folk in the audience. Heck, if I was at the Build Conference I'd be confused, too.

In fact, when I first heard this story yesterday, it was such a non-event in my life that I chortled a little and thought nothing more of it. I don't even remember who it was who told me. I just remember laughing and then going about my business... Because I assumed this was a joke. The I realise that this is real. Now I've had time to think on it this, clearly, is not a joke. But it is a little weird.

My History With Windows

I can remember life before Windows. My first PC was a 80286 which had a weird desktop. I really do not remember what the OS was, but I do remember the desktop was this thing called Counterpoint. For reasons of compatibility with my school life, Counterpoint had to bite the dust. Unceremoniously, it was replaced by DOS 6.22 and Windows 3 and, later, Windows 3.1. What I liked about Windows at this time was that the OS was not obfuscated... DOS was the OS and Windows was the user-space application that made the OS palatable (theoretically). If you wanted to get into the nuts-n-bolts of the OS, you could drop out of Windows. By the time Windows 95 came around, we were not supposed to do this anymore. Instead an in-Windows terminal was provided. This was no more-or-less shit than DOS itself. At least not to my memory. Then, later still, Windows was the OS with the UI running in kernel-space. I thought this was weird.

Of course I thought it was weird. By the time Windows XP came around, Linux was my jam.

Linux was great. I could play with it. I could poke around inside it. I had ready access to some really cool folk on the Internet who could teach me how it worked. I could configure it. I could make it bend to my will so that I could get my shit done... not that my shit was important at that age. But I could! It was epic. My killer application? Any decent terminal emulator providing me with a Bash shell.

On Bash

If you met me around 2006 you will probably remember the "desktop" I was rocking. It looked a little like this:

The Ion Window Manager filled my screen with Bash. I would always have Emacs open. And Lynx (no, really). And this funny little terminal-based MP3 player. And Mutt. And an RSS reader... etc etc. Getting around my work rarely involved the need for a mouse. It was great.

I never really became a Bash power user. I learned how to use it. I learned how to script it. But, by no means, was I a power user. It allowed me to be highly productive in a way that I just could not be on Windows. If nothing else, Bash was what made me love Linux.

The Bash On Windows "Joke"

So why did I chortle when I heard that Windows was going to support Bash natively? Let's start with...

It Just Ain't True

If you haven't done so already, go take a look at the video I posted above. Pay close attention to when we are shown the user navigating the file system. Notice the /proc /tmp etc etc? Yeah. Native. Having to dive into /mnt/ to find files? Yeah. Native. These things are just not familiar to your usual Windows user. But we don't care, right? This is not aimed at the average user. Bash support is clearly aimed squarely at developers and other power users who will clearly understand these issues...

Developers, Developers, Developers, Developers.... Ad Nauseam

...developers and powers users who, most likely, do not use Bash anymore.

Like many others, I switched to ZSH when git became one of my power tools. ZSH has been my shell of choice for quite some time now. I'm also a Mac user these days. OSX defaults to Bash, but a fairly old Bash that is GPL v2 licensed and not a newer GPL v3 edition. I'm fairly confident that I am not the only Mac user who switched to ZSH on their machine simply to get something newer than the old Bash.

Of course there are still plenty Bash power users out there. There are even more folk, like me, who have great affection for Bash even if they are not using it any more. Since switching to ZSH, Bash has "caught up". With the correct configuration and packages you can, for example, get auto-completion of git commands. You also get nice things like displaying your current git branch in the prompt. But all those users who switched to ZSH back then... they're not gonna switch back. There's all the other reasons to love ZSH...

The Real "Joke"? Bash On Windows Is No Joke

If I search my soul, I can come up with multiple reasons why my gut reaction was to not take the Bash on Windows story seriously. Of course I need to do some soul searching because this was a gut reaction caused by years of anti-Microsoft conditioning. I think the truth is, despite some flaws (and I do think these make the whole thing feel weird), having a Bash shell working on Windows is a real win for Windows users.

I think this has the potential to be a real win for Linux and Free Software, too. Exposure to Bash, I hope, is going to encourage a certain kind of user to want to explore Linux (after years of clinging to Windows). Then maybe those users will learn the benefits brought by Free Software. Or maybe even want to contribute. Of course there was no mention in the announcement that Bash is Free Software... baby steps. That said, I think (for better or for worse) today's Microsoft really does love Linux. When this new-found love causes Microsoft to support Free Software for the benefit of their users, that's a win. And certainly no joke.

No comments:

Post a Comment