Microsoft added systemd for more compatible applications

Two large companies, Microsoft and , collaborated to add systemd to the Windows Subsystem for Linux, allowing for the installation of a greater number of compatible applications.

Microsoft: we made a mistake about open source

systemd is a Linux software application that acts as a system and service manager to initialize daemons/services at operating system startup. Systemd also supports tools that allow Linux administrators to easily manage and control these services after they are started.

As systemd is responsible for starting all other services, it runs as the first process (PID 1) created by the Linux kernel at startup. All other initial boot services are then started and managed by systemd, as shown by the process tree below from Ubuntu.

pstree ubuntu

On the other side of operating systems, the WSL (Windows Subsystem for Linux) currently uses init as a system and service manager, and thus Linux applications that require systemd, such as Snap, microk8s (Kubernetes), and systemctl, do not work properly.

WSL now supports systemd
Yesterday, Microsoft and Canonical they announced that the latest version of WSL (Windows Subsystem for Linux) on Windows 11 builds now supports systemd, allowing you to install applications that require this specific service management.

If you're running a Windows 11 Insider build, you can upgrade to WSL 0.67.6 or later, using the command wsl --update. Once the update is complete, you can check the installed version using the corresponding command wsl --.

You should then enable systemd by booting the desired WSL Linux distribution and adding the following lines to /etc/wsl.conf:

[boot] systemd=true

As the /etc folder is owned by root, you need to use sudo for the console editor to edit it . For example, sudo vi /etc/wsl.conf.

It should be noted that this process must be done for each distribution you want to enable systemd.

Finally, close the WSL window and from the Windows 11 command line (Command Prompt or PowerShell), close the WSL distributions with the command wsl.exe --shutdown and restart your Linux distribution and you will see systemd running as PID 1.

For more information on how systemd works in WSL and how it will allow you to run more applications in WSL, you can watch this video by Microsoft's Craig Loewen and Canonical's Oliver Smith.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.086 registrants.
wsl, windows, linux, subsystem, systemd

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).