This article is more than 1 year old
A match made in heaven: systemd comes to Windows Subsystem for Linux
Has someone been Poettering about?
Linux distros running on Windows in a WSL2 virtual machine now can use the systemd init system.
This week Microsoft and Canonical jointly announced the news that the latest build of Windows Subsystem for Linux 2 (version 0.67.6 and higher) has been modified to support systemd. Canonical's blog post has some technical detail, and also takes the opportunity to promote its LXD container thingamajig.
Microsoft's corresponding announcement is not so technical – and the YouTube demo video even less so – but it does mention that there have been multiple third-party workarounds that have achieved the same thing.
For clarity, this is specific to WSL2, the second generation Windows Subsystem for Linux. WSL2 runs a full Linux kernel inside a dedicated VM, using a subset of the features of Windows' integrated Hyper-V hypervisor. The original version 1 WSL was a very different tool, which didn't contain a full Linux kernel.
The joint Microsoft/Canonical demo video gives as examples tools such as MicroK8s (pronounced "micro-Kates", and nary a mention of Kubernetes), and Canonical's cross-platform packaging format Snap, as Linux features that need systemd's functionality.
Apparently implementing this has required changing how WSL2 works, as previously it used a Microsoft program running as PID 1 for integration with the host OS. As such, the change to support systemd won't be pushed out automatically as it could break things for existing users. You'll need to install or upgrade to the necessary WSL2 build from the Microsoft Store to enable it.
- Windows Subsystem for Linux 2 splashes down on Win Server 2022
- AlmaLinux comes to Windows Subsystem for Linux
- WSL2 on Windows Server 2022 hits Windows Update
- Microsoft freshens up its in-house container Linux, CBL-Mariner
This has been an outstanding issue for a long time, and it's caused problems for some users. To this grizzled Linux veteran, not being able to use the
systemctl command doesn't seem like a big drawback, but to sysadmins young enough to have never seen a distro without Poettering's brainchild, it's confusing.
We suspect that other jaded old-timers might consider the absence of containers, Snaps, Flatpaks, and indeed systemd itself as positive advantages, but this is a cultural gap between generations and won't get any narrower. Far be it from us to speculate that Microsoft embracing, extending and then extinguishing systemd could ever be seen as a good thing. ®