more WSL

Nov 6, 2016 00:25 · 728 words · 4 minutes read WSL ubuntu Windows

Because I have too little pain and suffereing in my life, I decided to install one of the preview versions of Windows in order to try out the a recently updated version of bash for Windows. Or rather, a reasonably up-to-date version of what I learned is called WSL, for Windows Subsystem for Linux. There’s even a WSL blog on the MSDN site about it, so it must be a big deal.

first impressions

The previous version of WSL was based on Ubuntu LTS 14.04. Nothing wrong with that, of course, there are worse versions of linux to use. But 14.04 is over two year(?) old now, and Cannonical sensibly keeps the LTS versions with a pretty stable tree. This makes the 16.04 version included with WSL not dramatically different, but conspicuously newer.

Much of what is advertised from Ubuntu as Xenial features aren’t all that hugely useful on a desktop Windows install. I can’t imagine Windows users are absolutely gagging for Ceph filesystem support. But 16.04 walks a reasonable line between being current and also standard.

One big feature for WSL users is support for Windows binary executalbes from the bash terminal. In other words, put C:\Windows\system32 in your PATH and ipconfig /all or ipconfig /flushdns to your heart’s content. I haven’t done all that much with this feature, but it seems to work surprisingly well. One thing I did try was using Go.exe to run some go code and, again, while I don’t claim to have worked it to death, it seems to work.

Docker

As I was investigating a bunch of this WSL stuff, I also noticed that Docker was not really working at all. This was true for both the previous, Trusty based version of WSL, and the fancy new Xenial version. Unfortunately that appears unlikely to change any time soon, since MSFT has a full, surprisingly honest explanation (for them) about the problems and plans for Docker in WSL. The short version is that Docker is built with so much of what is in the kernel that it will take time and effort to get that running on WSL.

This makes sense when you think about it. Docker is really using a lot of container and namespace features that have been in the linux kernel for a long time. Docker takes those core kernel features and builds a CLI interface on top of it that is really easy to use if you’re famailiar with, say, Ruby and git or Pyton and git. As the WSL crew says in the link captioned above, WSL isn’t a full kernel running on Windows, it’s a clean-roomed userspace environment that lets a surprisingly large amount of Ubuntu run on top it.

real improvement

Running this version of Xenial as of today (November, 2016) involves jumping through a fair number of hoops. You have to install the ‘fast’ channel of Windows via their Insider program. You have to be willing to use a version of something Ubuntu-like that is marked very clearly as ‘beta’ software by the people writing it. I certainly wouldn’t run this on anything anyone was paying me to keep running.

But that’s part of the fun about working on such things today, yes? If you are keeping track of your dotfiles and using a server for version control, does one need a perfectly stable desktop these days?

I have been an enthusiastic Debian user since Sarge. At the same time I also worked in shops that were either completely or mostly Windows, both with .NET apps and desktops. During those years I spent a staggering amount of time and energy getting virtualization tools, Cygwin, and so forth working so I could use linux and still get along with my users. WSL is not a complete replacement for all of those tools, but I can do real work using WSL right now, today. NodeJS and Vim compile perfectly, postgres installs fine from the ubuntu repos, gsutil and the entire Google cloud managemetn stuff from their repos, standard GNU build tools and compilers work. Ruby and rbenv, apparently Go now as well.

I mean, that’s a serious step up from booting into a linux VM from Virtualbox, if you ask me. And the fact that I can run Vim and Hugo right next to Ableton Live makes my life a lot easier and way more pleasant.