Microsoft partners with Canonical to bring systemd to WSL

Microsoft and Canonical jointly announced that systemd can now run in Windows Subsystem for Linux (WSL2), a move that allows users to get a more comprehensive Linux experience on Windows devices. The author of systemd, Lennart Poettering, left Red Hat to join Microsoft in July, not sure if he contributed.

systemd is a set of basic building blocks for Linux systems that provides a system and service manager that runs as PID 1 and starts the rest of the system.

Many well-known Linux distributions (such as Ubuntu, Debian, etc.) run systemd by default. This change means that WSL allows you to use software that depends on systemd support, and also makes WSL more similar to the kind of Linux that is installed and run independently on the device. distribution rather than compatibility layer.

Some well-known Linux applications that rely on systemd include:

  • snap (Canonical's software packaging and deployment system for operating systems using the Linux kernel and systemd init systems)
  • microk8s (a lightweight Kubernetes designed to lower the entry barrier for K8s and cloud-native application development)
  • systemctl (check and control the status of the systemd system and service manager)

How To Enable systemd in Ubuntu WSL

  • To use systemd, first make sure you are running WSL from the Microsoft Store with version 0.67.6 and above, users can run wsl --versionto check the version number.
  • Next, in the Ubuntu instance, add the following modifications to /etc/wsl.confthe :
[boot]
systemd=true
  • Then reboot the instance by running wsl --shutdownin and reboot Ubuntu

おすすめ

転載: www.oschina.net/news/211376/microsoft-wsl-systemd