A Windows 10 development environment

I'm suddenly without a Mac for the first time in quite a while, and the only thing nearby that resembles a computer is my Microsoft Surface Pro 4.

This is a description of my efforts to use the Surface for software development.

I'm used to doing pretty much all my work in Emacs and Bash, so that's what I hope to get working.

Native tools

I decided to install and run Emacs and Git natively, and try to run everything else in some kind of contained or virtualised development environment. (I like the GUI version of Emacs better than the console version, and I need Git so I can use Magit within Emacs.)


Emacs has a native Windows build. I tweaked a couple of things to fix my config:

  • deleted a file in my config named $<, which couldn't be checked out by Git
  • set a HOME environment variable to C:\Users\<Name> so that ~ resolved as expected (without this, ~ resolves to C:\Users\<Name>\AppData\Roaming)
  • and most importantly of all, hid the menu bar via (menu-bar-mode -1)

Surprisingly, the rest of my config worked fine, except for things like find-things-fast (which is missing the underlying find command).

I haven't completely figured out the keyboard situation yet. In particular, I want to use M-TAB for autocomplete, but that's used by Windows.


Git also has a native Windows installer. It didn't seem like it would be easy to use an SSH keypair to authenticate against e.g. GitHub, so I also installed the Git Credential Manager. I think this uses OAuth instead, which works OK as long as you remember to use https://github.com/<user>/<repo>.git instead of git@github.com:<user>/<repo>.git URLs.

UNIX environment

My goal is to try and emulate an *nix environment, so I figured I have these options:

Of these, WSL seemed the most interesting since it promised the lowest friction and is an officially-supported (beta) Windows feature.

(A VM would probably be the most reliable option, but it seemed a little fiddly to set up, particularly if you go down the path of using X Windows.)

Once I configured WSL, I was able to install my various dotfiles and everything was more-or-less working: I could write this post and run Jekyll in development mode to see how it looked.

My biggest issue so far has been the reliability of WSL. I installed the Windows 10 Creators Update in the hope that would help, but I still encounter frequent freezes. The system seems to get into a broken state where reinstalling WSL is the only fix. I think it's a cool feature of Windows though; hopefully they can fix its issues. Edit (2017-11-26): turns out the anti-virus software I was using was quarantining various WSL files. Since uninstalling the anti-virus software it works much better.