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)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more