Microsoft and Canonical have collaborated to support ‘systemd’ in Windows Subsystem for Linux, allowing users to install a greater number of compatible software programs.
Systemd is a Linux software application that serves as the system and service manager, launching daemons and services during the boot process. Systemd also includes tools that allow Linux administrators to monitor and control these services after they launch. As it’s in charge of launching all other services, systemd operates as the first process (PID 1) launched by the Linux kernel on startup.
Because Windows Subsystem for Linux (WSL) currently utilizes ‘init’ as the system and services manager, Linux apps that require systemd — including Snap, microk8s (Kubernetes) and systemctl — don’t function properly. Microsoft and Canonical announced that the newest preview version of WSL in Windows 11 Insider builds now supports systemd, making it possible to install applications that require the service manager.
Some tweaking had to be done
The WSL architecture had to be changed to support systemd. Because systemd requires PID 1, the WSL init process launched within the Linux distribution becomes a systemd child process, Microsoft’s Craig Loewen explained in a statement.
The WSL init process is in charge of supporting interactions between Linux and Windows components. As such, modifying the hierarchy required Microsoft to revisit some of WSL’s init process assumptions.
Users of a Windows 11 Insider build can run the wsl —update command to upgrade to the WSL 0.67.6 preview or later. Once the program has finished updating, the wsl —version command can be used to check the installed version.
Microsoft published a video in which Craig Loewen and Canonical’s Oliver Smith describe how systemd functions and allows users to run more programs on WSL.