» notes » Windows Subsystem For Linux 🐧 2018-06-06

Windows Subsystem For Linux 🐧


I have been *nix-user for most of my life. Except for brief time in high school, Windows has never been my primary operating system. At this point I feel very comfortable in nix-style terminal window.

One big exception has been gaming, even though Valve has been quite succesfull in getting more games published to Linux. Recently I happened to spend longer than usual booted into Windows 10, and something occured me: if I had to spend time in this environment, I could at least make it a bit more comfortable.

I had read about the WSL before, and now seemed like a good time to try it out.

Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10. WSL provides a Linux-compatible kernel interface developed by Microsoft, which can then run a GNU userland on top of it, such as that of Ubuntu, Debian and Kali Linux. Such a userland might contain a Bash shell and command language, with native GNU/Linux command-line tools (sed, awk, etc.) and programming language interpreters (Ruby, Python, etc.). Wikipedia

Setting it up

The initial setup was easier than I expected. Microsoft’s official guide was straightforward.

The first big problem I noticed was that the default Windows cmd.exe is quite horrible. Luckily, there are multiple terminal emulators from which to choose. Some of them were based on MinTTY-terminal from the Cygwin project. At the moment I’m on wsl-terminal, but I might try a few options more.

The resulting setup is fairly usable. I ended up with the standard Ubuntu install, which should be sufficient for now. After cloning my dotfile-repo and fiddling with mintty’s settings, everything started feeling fairly comfy. Luckily support MinTTY-export, so I got my default theme formatted.

wsl terminal
wsl terminal

Interop with Windows works fine, with drives mounted under /mnt. Beeing able to setup SSH in the sane way is so much nicer than living with PuTTY.

One really nice part of that one is that the terminal can set up a Windows context menu for editing any file with Vim in WSL. It was of course always possible to use gVim, but real Vim is much nicer to use.


With WSL, Windows is actually very tolerable. Of course the lacking windows management is a problem, but luckily Microsoft has made some progress there. Win10 has even virtual desktops, and corner snapping makes it slightly easier to simulate tiling setup.

Remains to be seen how long I can keep this up.