Windows Subsystem for Linux instance has terminated

Short post on how to recovery from “The Windows Subsystem for Linux instance has terminated” with exit code 4294967295 (0xffffffff) which I have had a number of times recently. Usually after taking my notebook on the road without closing sessions then returning and connecting back to my dock.

WSL terminated with exit code 4294967295

There are a number of recommendations you’ll find searching how to recover but many also date back to WSL v1. And many indicate terminating services that also require a reboot. That’s not necessary for me. This is what works, and I am documenting it so I can find it quickly next time.

Recovery from WSL terminated with exit code 4294967295

In my case I’m running Ubuntu in WSL2. In a PowerShell window run the following command.

wsl --shutdown

Start a new WSL (Ubuntu) session and you’ll be back up and running.