Skip to content

Instantly share code, notes, and snippets.

@souhaiebtar
Last active October 17, 2023 08:40
Show Gist options
  • Save souhaiebtar/5e83bd499b2b022214a8effa4f661d9b to your computer and use it in GitHub Desktop.
Save souhaiebtar/5e83bd499b2b022214a8effa4f661d9b to your computer and use it in GitHub Desktop.
[wsl2 cannot run .exe] wsl2 cannot run .exe #wsl2 #wsl #linux #windows
sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'
sudo systemctl unmask systemd-binfmt.service
sudo systemctl restart systemd-binfmt
sudo systemctl mask systemd-binfmt.service
# source: https://github.com/microsoft/WSL/issues/8952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment