How to Enable systemd in WSL2
A complete walkthrough turning on systemd support in a WSL2 distro — configuration, the required restart, and verifying services actually manage correctly afterward.
tag
6 posts
A complete walkthrough turning on systemd support in a WSL2 distro — configuration, the required restart, and verifying services actually manage correctly afterward.
For years, software expecting systemd to be running as PID 1 simply didn't work correctly inside WSL. That changed in September 2022, closing one of WSL's longest-standing compatibility gaps.
For years, WSL distros ran without systemd — meaning services expecting it simply failed. Here's why that gap existed, and what changed architecturally to finally close it.
A service refuses to start at all, and systemctl reports start-limit-hit — this is systemd's own crash-loop protection, and it requires clearing the rate limit as a distinct step after fixing the real cause.
How systemd's unit model replaced sequential init scripts with declarative, dependency-driven service management.
A complete, working example converting a nightly backup cron job into a properly supervised systemd timer, with logging and failure visibility cron never gave you.