WSL Development Guide
Set up your perfect development environment with WSL, VS Code, and essential tools.
VS Code with WSL
Visual Studio Code provides excellent integration with WSL through the Remote-WSL extension.
Install VS Code and Remote-WSL Extension
1
Download and install Visual Studio Code on Windows
2
Install the Remote - WSL extension from the VS Code marketplace
3
Open WSL and run code . to launch VS Code in WSL mode
Ubuntu
user@PC:~/projects$ code my-project
Installing VS Code Server...
✓ VS Code Server installed successfully!
Opening VS Code...
Essential Development Tools
Git
$ sudo apt update
$ sudo apt install git
$ git config --global user.name "Your Name"
$ git config --global user.email "your.email@example.com"
Node.js & npm
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ node --version
$ npm --version
Python & pip
$ sudo apt install python3 python3-pip
$ python3 --version
$ pip3 --version
Docker
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker $USER
Recommended Project Structure
Organize your projects in the WSL file system for best performance:
Directory Structure
~/
├── projects/
│ ├── web/
│ │ ├── my-react-app/
│ │ └── my-nextjs-site/
│ ├── python/
│ │ ├── ml-project/
│ │ └── django-app/
│ └── go/
│ └── my-api/
├── dotfiles/
└── scripts/
Pro Tip: Keep all your development projects in the Linux file system (starting with /home/username/) for optimal performance and tool compatibility.
Development Workflows
Web Development with Next.js
Creating a Next.js Project
user@PC:~/projects/web$ npx create-next-app@latest my-app
user@PC:~/projects/web$ cd my-app
user@PC:~/projects/web/my-app$ code .
user@PC:~/projects/web/my-app$ npm run dev
Python Development with Virtual Environments
Python Project Setup
user@PC:~/projects/python$ python3 -m venv my-project-env
user@PC:~/projects/python$ source my-project-env/bin/activate
(my-project-env) user@PC:~/projects/python$ pip install django
(my-project-env) user@PC:~/projects/python$ code .