Debug School

rakesh kumar
rakesh kumar

Posted on

How to setup WSL on windows

How to install wsl
how to open wsl in visual studio

How to install wsl

Step1:Enable Required Windows Features
You must have these Windows features enabled:

Virtual Machine Platform

Windows Subsystem for Linux

Windows Hypervisor Platform (sometimes needed)

How to enable:

Open Control Panel → Programs → Turn Windows features on or off.
Enter fullscreen mode Exit fullscreen mode

Check the boxes for:

Windows Subsystem for Linux

Virtual Machine Platform

Windows Hypervisor Platform (if available)

Click OK and restart your PC

Image description

step2: open cmd not gitbash

wsl --install
Enter fullscreen mode Exit fullscreen mode

step3:type password
step4: you will get prompt

rakes@Zebronics:/mnt/c/Users/rakes$
Enter fullscreen mode Exit fullscreen mode

step5: press window +R

how to open wsl in visual studio

step 1:open visual studio
step2: Open VS Code.

Go to the Extensions view (Ctrl+Shift+X).

Search for "WSL" or "Remote - WSL".

If it is not installed, click Install.

If it is already installed, ensure it is enabled

step3:Go to the Extensions view (Ctrl+Shift+p)
Press F1 or Ctrl+Shift+P to open the Command Palette.

Type and select WSL: Connect to WSL (or WSL: Connect to WSL using Distro for a specific Linux distribution).

Use the File menu to open a folder located in your WSL filesystem.

Top comments (0)