无法在 WSL 中运行任何 systemd 服务

San*_*gde 8 windows-subsystem-for-linux kubernetes 18.04

没有任何 systemd 命令在 WSL(Ubuntu Bash 18.04)中工作。当我跑时sudo systemctl is-active kubelet,错误是 output: System has not been booted with systemd as init system (PID 1). Can't operate. : running command: sudo systemctl is-active kubelet

如何在 WSL 中启用 systemd 功能?有什么办法摆脱System has not been booted with systemd

Win*_*nix 5

cron是一项systemd您仍然可以在 WSL 中运行的服务。请参阅此答案作为有关如何设置kubelet应用程序的指南:

要扩展此链接,您可以修改 Windows 启动以在后台服务最小化的情况下加载 WSL: