Microsoft & Canonical Bring systemd To WSL
Microsoft and Canonical jointly announced today that systemd now works within Windows Subsystem for Linux (WSL2).
WSL can now run systemd inside of WSL Linux distributions for managing of services. Applications dependent upon systemd for use or simply for easy management can now run easier under this WSL environment on Windows 10/11.
Microsoft's announcement explains:
Over on the Ubuntu blog is also their own post about systemd for WSL and how to enable the support within Ubuntu.
We've known for months there was work to support systemd with WSL2 while now it's nice finally seeing it a reality. For what it's worth this news comes a few months after systemd lead developer Lennart Poettering also joined Microsoft.
WSL can now run systemd inside of WSL Linux distributions for managing of services. Applications dependent upon systemd for use or simply for easy management can now run easier under this WSL environment on Windows 10/11.
Microsoft's announcement explains:
Supporting systemd required changes to the WSL architecture. As systemd requires PID 1, the WSL init process started within the Linux distribution becomes a child process of the systemd. Because the WSL init process is responsible for providing the infrastructure for communication between the Linux and Windows components, changing this hierarchy required rethinking some of the assumptions made with the WSL init process. Additional modifications had to be made to ensure a clean shutdown (as that shutdown is controlled by systemd now) and to have compatibility with WSLg, It is also important to note that with these change, systemd services will NOT keep your WSL instance alive. Your WSL instance will stay alive in the same way it did before, which you can read more about here.
Given that this changes how WSL behaves when booting up, we wanted to be careful about applying this to user’s already existing WSL distros. So currently you need to opt-in to enable systemd for a specific WSL distro, and we will monitor feedback and investigate making this behavior by default in the future.
Over on the Ubuntu blog is also their own post about systemd for WSL and how to enable the support within Ubuntu.
Ubuntu's blog post today shows off systemd running on WSL.
We've known for months there was work to support systemd with WSL2 while now it's nice finally seeing it a reality. For what it's worth this news comes a few months after systemd lead developer Lennart Poettering also joined Microsoft.
66 Comments