WSL & containers
Linux on Windows, in two forms that are easy to confuse:
| You want | Reach for | What it actually is |
|---|---|---|
| A Linux machine you log in to and keep working in | WSL distro | A persistent Ubuntu (or other) install with your home folder, packages and shell |
| To run an app in a throwaway, repeatable environment | WSLC containers | wslc.exe, Microsoft's container CLI, built into WSL |
They share WSL underneath but are configured separately: .wslconfig applies to distros, and settings.yaml applies to containers.
Guides
| Guide | Description |
|---|---|
| Setup & distros | Install, first run, everyday wsl commands, limits, backups |
| WSLC containers | Run, build, volumes, settings, what's missing vs Docker |
| Paths & DDEV | wslpath, PATH, DDEV on Windows side |
| SSH agent | Load keys into the agent |
Picking one
- Daily Linux dev work → a distro. Clone repos into
~/and run your tools there. - A database, a service, or one build tool → a WSLC container, if a single
runcommand covers it. - A multi-service
compose.yaml→ Docker for now.wslchas no Compose command. - A repo you don't trust → not a plain distro. It can read your Windows files.
Quick hits
Node (latest LTS via nvm)
bash
nvm install --ltsDNS / networking
If resolution is flaky inside WSL:
bash
# set nameserver to 1.1.1.1
sudo nano /etc/resolv.confJetBrains + WSL Node
When using PHPStorm / WebStorm with WSL, point the IDE at the WSL Node binary:
Performance
Keep git repos under the Linux filesystem (~/…), not /mnt/c/….