Is there a way to enable systemd as a default in WSL2 on Win10?
My Debian images normally run a linux distribution. I’m trying to get them to run on a development machine with Docker Desktop on WSL2 on Win10. The issue I’m getting is
mount.nfs: rpc.statd is not running but is required for remote locking.
This is probably because systemd is not running when the image is mounted on WSL: this is probably because the kernel is not supporting systemd. (In production, systemd is running in the docker container, rpc.statd is running, and mount is working correctly)
Windows: 10.0.19045.4651
WSL: 2.2.4.0
Docker Engine: 27.1.1
Kernel Version: 5.15.153.1-microsoft-standard-WSL2
WSL Default Distribution: docker-desktop-data
At the time of writing, this is the most recent update of WSL2 for Win10, and the most update of docker desktop for Win 10.
No other distributions are installed.
(1) In 2024, is systemd supported in WSL2 on Win10?
(2) Can systemd support be configured using Docker Desktop?
(3) Is there a global/default WSL setting available now?
(I see that, in 2022, in the unstable channel, on Win11, it could be enabled inside WSL2, on a per-instance basis. That information is everywhere on the internet, including on stackoverflow).