MicrosoftDocs / WSL

Source code behind the Windows Subsystem for Linux documentation.
https://docs.microsoft.com/windows/wsl
Other
1.89k stars 556 forks source link

Install VScode on wsl2 does not work on Win11 #1782

Closed sumitsengupta closed 1 year ago

sumitsengupta commented 1 year ago

Documentation Issue

On a windows 11, wsl2 trying to install VS code.

Even after following the instructions from the page it is not working.

I did -

  1. sudo apt-get update
  2. sudo apt -y upgrade ( not in doc page, just in case )
  3. sudo apt-get install wget ca-certificates ( all were installed already )

code . Command 'code' not found, but can be installed with: sudo snap install code sumit@LAPTOP-BGOPTLUL:~/Documents/Github/cgi$ sudo snap install code error: This revision of snap "code" was published using classic confinement and thus may perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk.

   If you understand and want to proceed repeat the command including --classic.

Link to documentation page

https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode

Suggested Improvements

Please follow the desc and see what works on wsl2 on win11

Screenshot 2023-07-03 174945

craigloewen-msft commented 1 year ago

I would recommend using VS Code Remote for this use case! https://code.visualstudio.com/docs/remote/wsl

As well, for future technical issues ( that aren't related to the doc ) please file them on github.com/microsoft/wsl

Thank you!