In this article, you will learn how to install VS Code on WSL2. This is a beginner-friendly step-by-step tutorial, and we take you through every step!
Table of Contents
- How to install VS Code on WSL2
- Learn more about VS Code and WSL2
How to install VS Code on WSL2
To be able to install VS Code on WSL2, you first need to install VS Code on Windows. Follow this tutorial to install VS Code on Windows, and then continue with the steps below.
Installing VS Code on WSL2
Launch your WSL2 terminal and run the following command:
This will ask you to install the x64 Visual Studio Code server. Agree with yes or by pressing Enter. After this, you can launch VS Code right out of your WSL2 terminal by typing:
Tip: You can open any folder inside of WSL 2 directly with VS Code by navigating to the folder you want to open and then just typing
Learn more about VS Code and WSL2
Practice with WSL2 and VS Code
We have recently released a great, beginner-friendly tutorial series that uses WSL2, Astro, and VS Code to build a static website that we later deploy on Netlify for free. We highly recommend checking it out to up your VS Code skills!
VS Code and WSL2 are a match made in heaven. I use it heavily on a daily basis, and this combination has tremendously increased my productivity when it comes to writing code.