如何在Ubuntu 14.04中使用systemctl?


我在Ubuntu 14.04中执行以下命令:

systemctl enable --now docker-cleanup-dangling-images.timer

我试过sudo,我用service和system d替换system ctl,但是没有任何效果。

sudo: systemd: command not found systemd: command not found sudo: service: command not foud

如何在Ubuntu 14.04中执行此命令

提问于 2018-02-17
 

2 个回答

用户回答回答于 2018-02-17

我刚刚自己遇到了这个问题,发现Ubuntu 14.04使用Upstart而不是Systemd,所以systemctl命令不起作用。

 

为了启用,通用看起来如下所示:

update-rc.d <service> enable

禁止服务开机自启:

update-rc.d <service> disable

链接到Ubuntu文档:https//wiki.ubuntu.com/SystemdForUpstartUsers


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM