The Windows Subsystem for Linux is an optional feature for running Linux applications on Windows PCs, thanks to a lightweight virtual machine. It will soon work with even more Linux software, thanks to newly-added systemd support.

Microsoft introduced a revamped Windows Subsystem for Linux in 2019, known as WSL2, which runs the Linux kernel and other system functions on top of a minimal virtual machine (a specialized Hyper-V container, to be specific). It's fast and has full access to your Windows files, but lacks support for systemd -- a collection of services and utilities in most Linux distributions that handle devices, logging, networking, and other functions. That means software that requires systemd doesn't work or has more limits in WSL2, such as Docker containers and applications distributed as 'Snap' packages.

Canonical (the developer of Ubuntu Linux) and Microsoft have been working together to fix the problem, and now systemd is available on WSL2. It's limited to the Preview version of WSL for now, and you have to turn it on by modifying a settings file -- the full instructions are in the source link below. Once that's done, rebooting WSL will enable systemd.

Screenshot of WSL2 and a browser with Nextcloud running
Microsoft

The main advantage to the new feature (and likely why Canonical was helping) is that packages from Canonical's Snap Store can now be installed. Snap is a common method of distributing Linux software, and even though the technology isn't popular with many people, some apps are only officially available as Snap packages.

Best of all, the new feature should be available in WSL2 on both Windows 10 and 11 once it's ready. For now, it's limited to Windows Subsystem for Linux Preview running on Windows 11 Insider builds.

Source: Ubuntu

Via: The Register