我在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中執行此命令
我剛剛自己遇到了這個問題,發現Ubuntu 14.04使用Upstart而不是Systemd,所以systemctl命令不起作用。
為了啟用,通用看起來如下所示:
update-rc.d <service> enable
禁止服務開機自啟:
update-rc.d <service> disable
鏈接到Ubuntu文檔:https://wiki.ubuntu.com/SystemdForUpstartUsers