Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README to reflect WSL 2 command for Windows 11 #685

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

peteski22
Copy link
Contributor

After spending a lot of time trawling around forums and issues, trying various commands, I stumbled upon this comment in an issue which solves the problem for me (and now hopefully others running Windows 11 with WSL 2).

TL;DR:

sudo sh -c "echo -1 > /proc/sys/fs/binfmt_misc/WSLInterop-late"

Please let me know if there's any changes you'd like, but it would be good to see this in the README as it can hopefully save someone else a lot of internet searching. 😄

Co-authored-by: mofosyne <mofosyne@gmail.com>
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jart jart merged commit 72a5f8d into Mozilla-Ocho:main Jan 29, 2025
2 checks passed
@vlasky
Copy link
Contributor

vlasky commented Jan 30, 2025

After spending a lot of time trawling around forums and issues, trying various commands, I stumbled upon this comment in an issue which solves the problem for me (and now hopefully others running Windows 11 with WSL 2).

TL;DR:

sudo sh -c "echo -1 > /proc/sys/fs/binfmt_misc/WSLInterop-late"

Please let me know if there's any changes you'd like, but it would be good to see this in the README as it can hopefully save someone else a lot of internet searching. 😄

NOTE: To those who use VS Code under Windows and do cross-development within WSL2 - you will notice the code command will fail with the following error after executing the above command to disable WSL Interoperability.

/mnt/c/Users/MyUsername/AppData/Local/Programs/Microsoft VS Code/bin/code: 61: /mnt/c/Users/MyUsername/AppData/Local/Programs/Microsoft VS Code/Code.exe: Exec format error

To re-enable WSL Interoperability, run the following command:

sudo sh -c "echo ':WSLInterop:M::MZ::/init:PF' > /proc/sys/fs/binfmt_misc/register"

This should be included in the docs as well.

@peteski22 peteski22 deleted the docs/readme/wsl-update branch January 30, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants