输入sudo systemctl status ssh后提示System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
这个错误提示意味着你的系统没有使用systemd作为初始化进程。systemd是现代Linux系统的默认初始化系统。这通常会在较旧的系统上发生,或者在使用非标准的系统配置时发生。
在这种情况下,你可以尝试使用以下命令来查看SSH服务是否正在运行:
service ssh status
如果SSH服务正在运行,你应该看到服务的状态报告。如果服务未运行,你可以使用以下命令启动它:
service ssh start
如果你的系统使用的不是systemd,请确保使用正确的命令来管理系统服务。
sudo systemctl start docker System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: 主机已关闭
当您尝试使用sudo systemctl start docker
命令启动Docker服务,遇到提示"System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus"时,这通常意味着您的系统不是使用Systemd作为初始化系统启动的,而Systemd是Ubuntu、Debian等一些基于Systemd的Linux发行版默认的管理系统。
这个错误表明您无法通过Systemd控制台来操作Docker服务。对于非Systemd启动的系统(如旧版本的Red Hat系列,或是早期的Ubuntu),您可以尝试手动启动docker服务:
非Systemd启动(例如Ubuntu 16.04及之前):
- 打开终端,输入
service docker start
或者/etc/init.d/docker start
- 打开终端,输入
在某些Systemd支持的环境下(例如旧版本的CentOS):
- 可能需要先切换到Systemd模式,然后尝试
systemctl start docker
。如果未使用Systemd,您可能需要安装systemd-sysv,并按照该包的文档来管理服务。
- 可能需要先切换到Systemd模式,然后尝试
请注意,如果您的系统已经升级到了Systemd并且仍然遇到这个问题,那可能是由于配置问题导致的,建议检查系统的启动脚本和依赖设置是否正常。
运行sudo systemctl start docker提示System has not been booted with systemd as init system (PID 1). Can't operate.
这个错误提示表明你的系统没有使用 Systemd 作为 init 系统。如果你想在这种情况下启动 Docker,你可以尝试以下方法之一:
使用 SysVinit 启动 Docker:
- 运行
sudo service docker start
命令启动 Docker。 - 如果提示
docker: unrecognized service
,可以尝试运行sudo /etc/init.d/docker start
。
- 运行
如果你的系统使用其他 init 系统(如 Upstart),可以尝试使用相应的命令启动 Docker。例如,对于 Upstart,你可以运行
sudo start docker
。如果你的系统不是基于 Systemd 的 Linux 发行版,你可以尝试使用适用于你的系统的特定启动脚本来启动 Docker。请查阅相关文档以获取更多细节。
相关推荐
















