为什么在 WSL 中禁用了 systemd? [英] why systemd is disabled in WSL?

查看:55
本文介绍了为什么在 WSL 中禁用了 systemd?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有任何 systemd 命令在 WSL(Ubuntu Bash 18.04)中运行.当我运行 sudo systemctl is-active kubelet 时,错误是 output: System has not been boot with systemd as init system (PID 1).不能操作.: 运行命令:sudo systemctl is-active kubelet

None of the systemd commands are working inside WSL( Ubuntu Bash 18.04). When I ran sudo systemctl is-active kubelet, error is 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

How to enable systemd feature in WSL? Whats the way to get rid of System has not been booted with systemd

推荐答案

目前 WSL 不支持 Systemd.可以在此 GitHub 问题中找到更多信息.

Systemd is not supported in WSL at this time. More information can be found with this GitHub issue.

此外,Docker(在撰写本文时)并没有在 WSL 之上工作,这意味着 Kubelet 不会有太大用处.为了在本地运行 Kubernetes,您可以使用 Docker for Windows,其中包括 Kubernetes支持,或者您可以使用 Minikube 运行带有 Hyper-V 或 Virtualbox 的虚拟机.

Furthermore, Docker does not (at the time of writing this) work on top of WSL, which means Kubelet won't be of much use. In order to run Kubernetes locally, you can use Docker for Windows which includes Kubernetes support, or you can use Minikube to run a VM with Hyper-V or Virtualbox.

这篇关于为什么在 WSL 中禁用了 systemd?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆