Ubantu 报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.

该错误提示表明你的系统没有使用 systemd 作为初始化系统。在 Linux 系统中,初始化系统是启动系统时第一个启动的进程,负责启动和管理系统中的各种服务。我在使用sytetmctl 查服务状态时中出现了这个问题。 参考原文地址: 原文参考

# apt 更新
sudo apt-get update
 
# 安装 systemd, systemctl
sudo apt-get install systemd -y
sudo apt-get install systemctl -y