WSL and VS code issue in windows 11

Copper Contributor

after upgrading to windows 11 when I run WSL I see this error "An error occurred mounting one of your file systems"

Also when I try to open VS code in WSL it says VS code for wsl closed unexpectedly. 

And the terminal show this error:


[2021-08-10 07:59:08.861] sh: 1: /scripts/ not found
[2021-08-10 07:59:08.861] VS Code Server for WSL closed unexpectedly.
[2021-08-10 07:59:08.861] For help with startup problems, go to
[2021-08-10 07:59:08.861]
[2021-08-10 07:59:08.876] WSL Daemon exited with code 0


I am at windows 11 pro build : 22000.120

2 Replies

@iamvikas you need to open PowerShell with admin privileges and do wsl --update, seems like the kernel needs to be updated to mount the filesystem for wsl.

Thanks @readonly, works for me