I have Windows 11 with Ubuntu installed with WSL2. I'm not able to configure Systemd in order to use snap installations.
I have configured the file /etc/wsl.conf
configured with the following entries (According to this page):
[boot]
systemd=true
But it doesn't work for me.
I can execute systemctl list-unit-files --type=service
and list the services, but when I try to start, stop or see the status of a service there is the error:
System has not been booted with systemd as init system (PID 1).
Can't operate. Failed to connect to bus: Host is down
uname -a
lists the following:
Linux XXXXXXXXXXXX 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
lists the following:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
I have also tried to configure according to this page but my installation always gets broken.
Can someone help me?
wsl --version
to your question (in code-blocks). Thanks! – NotTheDr01ds Nov 16 '22 at 16:46
– José Ramos Nov 16 '22 at 19:06wsl --version Versión de WSL: 1.0.0.0 Versión de kernel: 5.15.74.2 Versión de WSLg: 1.0.47 Versión de MSRDC: 1.2.3575 Versión de Direct3D: 1.606.4 Versión DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Versión de Windows: 10.0.22000.1219
I hope this could help others to have Ubuntu in WSL2 and SYSTEMD working.