Calling WSL from Windows Scripts: Commands, Working Directories, Streams, and Exit Codes
How PowerShell and CMD invoke Linux tools through wsl.exe, select distro and user, control working directories, quote arguments, and preserve failures.
A real Linux kernel and userland running alongside Windows - architecture, integration, and daily use.
How PowerShell and CMD invoke Linux tools through wsl.exe, select distro and user, control working directories, quote arguments, and preserve failures.
A safe WSL 2 recovery flow that shuts distributions down, backs up the VHDX, attaches it bare, identifies the Linux device, runs e2fsck, and unmounts.
How to identify the right WSL 2 distribution, quiesce it, expand its virtual disk and ext4 filesystem, verify capacity, and avoid destructive AppData edits.
How signed WSL plugin DLLs hook virtual-machine startup, launch Linux-side agents, communicate over virtual sockets, and can fail the whole WSL service.
How WSL Settings edits global WSL 2 configuration, coexists with .wslconfig, differs from per-distribution wsl.conf, and applies changes safely.
How a Windows WSL launcher registers a rootfs, configures distribution identity and default UID, handles first run, invokes WSL APIs, and updates safely.
A forensic WSL migration guide separating Linux root-file-system contents from Windows registration, launcher identity, default user, VHD state, and secrets.
An evidence-first WSL localhost repair path covering Linux listeners, address families, NAT versus mirrored mode, forwarding, firewalls, proxies, and persistence.
A WSL systemd lifecycle guide covering user managers, linger, targets, journal evidence, environment, distro termination, Windows startup, and honest limits.
A reproducible custom-WSL workflow covering trusted rootfs creation, tar ownership, import, users, wsl.conf, systemd, networking, export, and acceptance.