I use Windows 11 system.
My project require to use a docker environment. In order to do so, I need to install WSL, a Linux terminal. And I meet problem in connecting WSL into Visual Studio Code.
Step 1: I already install WSL
Step 2: I also install WSL extension in Visual Studio Code.
Problem:
But when I need to use WSL comment from terminal inside Visual Studio Code, I cannot find WSL option…
2
Answers
You can’t access the WSL for Docker Desktop directly.
Instead, you run all your docker commands from the host and it’ll run them on the docker engine ran in the background in that wsl instance.
If you want a normal linux WSL installation, you have to install a distribution manually from the Microsoft Store. That one should then also appear in Visual Studio Code.
You need a linux distro on WSL, which from the screenshot you shared you do not have.
Ubuntu is the easiest, you can follow the steps here: https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#1-overview