Aero, PowerShell, Metro, Cortana, Edge. All ‘exciting’ new features that generated an overwhelming ‘meh’ from the developers in our office. Some of us held off upgrading Windows versions until we absolutely had to! As there was just no compelling reason to do so. Then, all of a sudden, along came a feature so compelling that we just had to download the latest update, even before it was pushed out! Enter Windows Subsystem for Linux, or WSL.
Within roughly 10 minutes of having the update installed (and after we’d helped one of our developers off the floor who had collapsed with the excitement and prospect of having access to Linux tools natively in Windows), the question Could we get our entirely Linux based Replify Virtual Appliance running on WSL? was posed. No more than 30 minutes and a couple of minor code changes later, it was up and running, providing offload at speeds comparable to our Linux servers!
Linux rocks!
At Replify, the primary development environment is Linux. Although we all use Windows on our desktops (we just can’t pull ourselves away from MS Office), we spend most of our day staring at a PuTTY window with vim
running on our development machines. We’ve all become accustomed to getting things done quickly with a command line and a great suite of Linux tools such as; sed
, awk
, vim
, bash
, and grep
. To get these features on Windows, we typically have put up with installing cygwin – which up until now has been an essential application in our tool-kits.
To dig a bit deeper, the barriers for our VA running out of the box were as follows:
- The
getifaddrs
call that we use to get interface details hasn’t been implemented on the subsystem yet. We hard-coded this to get round the problem. - We use
iptables
along with a number ofsysctl
parameters that rely on unavailable kernel functionality. This isn’t required for basic optimisation, so we can just comment these out. - We use
capabilities
to allow us to listen on privileged ports. We can either run as root instead or use a non privileged port (i.e. greater than 1024).
The WSL is presently in beta and I sincerely hope that Microsoft (and Canonical) continue to improve. More people using cross-platform tools and languages can only be a good thing!