Linux on Windows
Using Linux on Windows
TL;DR Use Vbox + add a virtual network interface + Windows Terminal + ssh into your headless VBox instance.
Windows Subsystem for Linux is a great piece of software and definitely helps microsoft bring the linux experience on the regular computer. But if you’re about to use this or are unsure then consider the following alternatives:
- Native Linux (duh!): You probably rejected this for some reason but here’s another attempt from my side. Modern Windows is really resource hungry. Likely due to hugry and unnecessary microsoft processes which want to share your data with “trusted third parties” or the worlds least optimised system upgrade or somthing. The latest processors won’t cry about it but on an old hand me down type laptop linux can surprise you withits speed.
- Dual-boot ? (Another silly attempt of mine, I’ll stop now)
- VirtualBox + Linux: Rather than a lightweight containerisation. Fully containerise your workload. Use whatever linux you want rather than being dependent on a community packaged version. I couldn’t notice the perf difference between WSL2 and VBox nor could I find any convincing benchmarks.
After installing VBox setup a virtual internal network so that when you ssh into the machine you don’t hop via your wifi router. The linux instance will end up having two interfaces, one being used for ssh and another for internet. Take care about allowing ssh via all interfaces. Definitely use a ssh keypair.
VBox Guest Additions provides some additional helper software like drive mounts which are quite convenient for sharing across guest and host OS.
Write a windows startup program which starts your VM in headless mode for convenience.
I may revisit this and write more verbose instructions if I ever have to unfortunately use windows again.