Working with WSL2
I've been using WSL2 for most of my Windows dev work for a while now, and I finally sat down to understand exactly what's happening under the hood, mostly because I kept hitting the same disk space issue every few months and got tired of googling the fix each time. This post covers what WSL2 is, where it's actually useful, the trade-offs, picking a distro, the commands I use most, connecting it to Docker, and that disk space issue in detail. What WSL2 Actually Is WSL1 worked by translating Linux system calls into Windows API calls on the fly. It was a clever approach but it had real limits: anything that needed actual kernel behavior, like Docker or proper namespaces, just didn't work. WSL2 does something different. It runs a real Linux kernel inside a lightweight Hyper-V virtual machine that Microsoft maintains. That's the part that matters. WSL2 isn't emulating Linux, it's running it. Each distro you install gets its own instance of this VM, backed by it...