Using WSL with VS Code without mixing Windows and Linux paths
Install WSL, open a Linux folder with Remote - WSL, run install scripts in the right terminal, and avoid node/python confusion across Windows and Linux.
Windows Subsystem for Linux (WSL) lets you develop in a Linux environment while keeping VS Code’s UI on Windows. The Dev Setup full-stack preset may include Remote - WSL. Mixing “Node on Windows” with “project files in \wsl$\…” is the most common source of mysterious build failures. This guide keeps the pieces on the same side of the boundary.
Install WSL once
Follow Microsoft’s current WSL install documentation (wsl --install on supported Windows versions). Reboot if prompted, launch your distro (often Ubuntu), create a UNIX user, and update packages. You do not need to master Linux before writing web apps—but you do need a working distro shell.
Open the project inside WSL
- Install the Remote - WSL extension in VS Code on Windows.
- From a WSL terminal, cd to your project under the Linux home directory (for example ~/projects/app), then run: code .
- VS Code reconnects in WSL mode. The green remote indicator should mention WSL.
- Prefer storing active projects in the Linux filesystem, not under /mnt/c/…, for better file-watch performance.
Where to run Dev Setup scripts
If you develop inside WSL, run extension installs and npm/python commands in the WSL remote window’s terminal so tools land in the Linux environment. A script run in Windows PowerShell installs Windows-side extensions and tools; that will not fix a missing node inside Ubuntu. Conversely, pure Windows beginners who never open WSL should stay on PowerShell scripts and skip Remote - WSL.
Duplicate runtimes
- Node on Windows ≠ Node inside WSL. Install and verify node -v in the environment you build in.
- Python venvs created on Windows are not portable into WSL; recreate .venv inside Linux.
- Git line endings and file modes can differ; configure core.autocrlf thoughtfully if you cross the boundary often.
When to skip WSL
If you are learning HTML/CSS only, or following a Windows-only course, skip WSL until you need Linux parity (Docker-ish workflows, deployment matching production Linux, certain native modules). Extra complexity without a goal slows beginners down. More guides: this site’s Guides index. Feedback: https://github.com/smartopslab128-ctrl/gif-image-paste/issues
More guides
- Install the VS Code `code` command (PATH) on Windows, macOS, and Linux
- How to choose a Dev Setup preset (frontend, Node, full-stack, Python)
- Run the Dev Setup install script safely in VS Code’s terminal
- Common Dev Setup errors and how to fix them
- Fix “node is not recognized” and npm install problems on Windows, macOS, and Linux
- Python and venv first steps after installing VS Code
- Live Server not opening pages: checklist for VS Code beginners
- When VS Code extensions fail to install (Marketplace, script, or UI)
- Your first week after Dev Setup: a practical checklist