首页 > 解决方案 > 为什么“systemctl”不能在 Windows 上的 Ubuntu 终端中工作?

问题描述

我需要在窗口 10 的 ubuntu 终端中使用 systemctl 命令重新加载守护进程。我附上了收到的错误。请帮助我。

错误:bashdos@yana:~$ systemctl 系统尚未使用 systemd 作为 init 系统 (PID 1) 启动。不能操作。

感谢先进。

标签: windows-subsystem-for-linuxsystemctlstart-stop-daemon

解决方案


WSL 没有实现 systemd,因此在 Ubuntu 中您需要运行例如“service start ssh”,或者您可以直接调用二进制文件,例如 /etc/init.d/ssh start/stop/restart。


推荐阅读