Daemonized WSL2

1 minute read

Recently (about a month ago), I had to re-setup my work environment due to some corruptions in my file system (the fast ring (dev) builds of Microsoft’s insider are glitchy).

So that led to a couple of conscious selection points, summarized here:

  • upgraded to Ubuntu 20.04 LTS
  • started using the unofficial jonathanf vim PPA for getting on to V8.2
    • not getting on to neovim yet but sometime soon, just cause the philosophical differences in development compared to vim (vim 8+ and neovim don’t deviate drastically yet)
  • shifted to powerline for all (vim,tmux and shell) rather than a different setup for all
  • not just the tools but also my habits with how I use them
  • vim is now my multiplexer as well : I always liked vim buffers more than tmux
    • way more sensible default switching key-bindings
    • use tmux only to dispatch a process for long
    • integrated a customizable repl in vim and feel the editing environment to be more complete than that of tmux + vim(editor only) for general scripting and daily stuff

Heading to what I originally intended for, WSL2 can be daemonized now (the system initialization pid 1 issue can be handled), still in a very hackish way though.

I had to revisit this again due to virtualization issues (first addressed here) encountered in a computer networking class.

So.., here is a collection of references if I do need to get down and dirty in the rabbit hole of environment configuration sometime in the future:

What this means is that given the coupling of kvm with wsl2, I can run virtual machines fairly cheaply compared to that of using a level 1 hypervisor like virtual box ( even qemu + wsl2 fairs pretty well). Thanks to the fact that wsl2 and kvm, both are level 2 hypervisors and that microsoft ships a complete linux kernel with recent Windows builds.

Leave a comment