DEV Community

Rodrigo Burgos
Rodrigo Burgos

Posted on

Short: How to use VSCode on WSL2

Open bashrc

nano ~/.bashrc

Add this on the end of the file:

export PATH=$PATH:/mnt/c/Users/<YourUsername>/AppData/Local/Programs/Microsoft\ VS\ Code/bin
Enter fullscreen mode Exit fullscreen mode

Apply the changes:

source ~/.bashrc

Test the code command: Now, try running code . in the WSL2 terminal again:

code .

Top comments (0)