Photo - Torsten Dederichs
Photo

WSL

Reset WSL2 Quickly

If you're getting Network Unreachable in WSL2 for some reason, try this:

sudo Disable-WindowsOptionalFeature -Online -FeatureName -NoRestart `
    $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")
sudo Enable-WindowsOptionalFeature -Online -FeatureName `
    $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

Use Docker in WSL2

There are a few ways to get Docker working.

If you only need Docker to work, I strongly suggest you use the Docker Desktop WSL2 integration.

Systemd in WSL2

You can use a hack such as this one, but really, this isn't a good solution. (Largely because Microsoft updates it a lot and things break often.)

I suggest you investigate a Hyper-V, VMWare, or VirtualBox VM. Alternatively, if you have another disk, dual booting is quite reasonable if you give each OS a disk.