Can WSL Replace an OSX Development Environment?

Breathing new life into an older windows machine

Dean Baker
The Startup
4 min readAug 25, 2020

--

Photo by Dietmar Becker on Unsplash

I love developing on OSX, I have a great development environment with iTerm, oh-my-zsh and various JetBrains IDEs — the performance on a MacBook is incredible compared to so many windows machines.

Unfortunately, some updates the SOE (Standard Operating Environment), and the fact that it is indeed a work machine has brought the friction level for personal use to a point where I need to look for an alternative.

I bought my Surface Pro a few years ago when I was doing much more managerial work, and writing code was a distant memory. The Surface Pen is a great addition for any architect or technology leader to quickly and efficiently get a point across — they say a picture is worth a thousand words, after all. It is a beautiful piece of hardware, and my only regret is that I bought a model with 8gb of ram, hardly enough to get serious writing code, running docker, and googling stack overflow.

The Transition

First things first, this is a Windows machine and I have been using it on and off for a few years now — time for a spring clean. And by spring clean I mean wholesale reinstall the OS from scratch. I can’t have any niggling gremlins ruin my experiment.

WSL

I had played a little with WSL (Windows Subsystem for Linux) a year or so ago, and to be honest it didn’t blow me away. I found it to be slow, perhaps slower than using PowerShell. WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM).

WSL 2 is only available in Windows 10, Version 2004, Build 19041 or higher

There are a bunch of blog posts and official documentation on how to install the thing, so I leave that up to you.

IDE

VSCode has come a long way and is the IDE of choice for many JavaScript and Go developers I meet. It has great out of the box WSL support and is a no brainer to get you up and running fast.

For Java I have always used IntelliJ, again this is resource intensive and for the moment I am not cutting any Java on my personal time. Currently there is no out of the box WSL support, which makes me sad. You can launch IntelliJ from WSL, for you will need to run an X Server for Windows, I followed this blog for instructions:

Browser

We all know that Chrome is a resource hog, and with a machine with 8gb of ram it probably has to go. I have decided to give Edge a shot, the new build looks and feels like Chrome, and I can install my favourite extensions from the Chrome store.

If you aren’t using it already, Vimium is a nice plugin that lets you use your browser using Vi key bindings, allowing you to feel like a haxor even when reading the evening news.

Docker

I have installed Docker Desktop for Windows, you will notice a checkbox to enable WSL support, so your containers will be run under the subsystem.

All I have done here so far is run through the tutorial to ensure that I can build and run containers in by Ubuntu terminal, I have not given it a fair go just yet.

I did manage to get a dockerised single node Kafka cluster working on this machine under WSL1 a year ago and it worked, so there’s that!

Wrapping up

I now have a reasonable development environment on my Surface Pro, I have used it to do a little Go and even some React — but nothing of any real size. I thought I would have more time to get some personal projects up amidst the pandemic but that hasn’t happened as planned.

I like Windows 10, if I am honest I might even prefer it over OSX these days; WSL2 has enough power to really make me think twice about buying a MacBook for personal use. A machine like a Dell XPS 13 running WSL would be a real contender for my development machine of choice. Maybe next financial year!

--

--