WSL で systemctl エラー
現象
WSL で systemctl を使用した際に下記のエラー。
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
回避策
/etc/wsl.conf に下記を記述。
[boot] systemd=true
WSL を再起動
wsl --shutdown wsl
Copyright (C) 2024 杜甫々
初版:2024年7月21日 最終更新:2024年7月21日
https://www.tohoho-web.com/tr/20240721_1.html