Dev Setup

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

  1. Install the Remote - WSL extension in VS Code on Windows.
  2. From a WSL terminal, cd to your project under the Linux home directory (for example ~/projects/app), then run: code .
  3. VS Code reconnects in WSL mode. The green remote indicator should mention WSL.
  4. 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