Skip to content

WSL & containers ​

Linux on Windows, in two forms that are easy to confuse:

You wantReach forWhat it actually is
A Linux machine you log in to and keep working inWSL distroA persistent Ubuntu (or other) install with your home folder, packages and shell
To run an app in a throwaway, repeatable environmentWSLC containerswslc.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 ​

GuideDescription
Setup & distrosInstall, first run, everyday wsl commands, limits, backups
WSLC containersRun, build, volumes, settings, what's missing vs Docker
Paths & DDEVwslpath, PATH, DDEV on Windows side
SSH agentLoad 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 run command covers it.
  • A multi-service compose.yaml → Docker for now. wslc has 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 --lts

DNS / networking ​

If resolution is flaky inside WSL:

bash
# set nameserver to 1.1.1.1
sudo nano /etc/resolv.conf

JetBrains + 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/….