WSL stops running windows programmes
WSL stops running windows programmes
Occasionally WSL throws a wobbly and won't run a Windows programme, citing an "exec format error".
Most commonly when you fire up the ubiquitous code .
to run CS Code in the current directory.
The cure is documented in this Github Issue:
sudo vi /usr/lib/binfmt.d/WSLInterop.conf
- Insert these contents:
:WSLInterop:M::MZ::/init:PF
- close terminal
- from windows shell
wsl -t <DISTRO>
- restart WSL2