How to use systemctl in Ubuntu 14.04

前端 未结 4 1668
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 09:35

I try to perform the following command in Ubuntu 14.04:

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

I also tried it with sudo,

4条回答
  •  逝去的感伤
    2021-01-31 10:03

    I just encountered this problem myself and found that Ubuntu 14.04 uses Upstart instead of Systemd, so systemctl commands will not work. This changed in 15.04, so one way around this would be to update your ubuntu install.

    If this is not an option for you (it's not for me right now), you need to find the Upstart command that does what you need to do.

    For enable, the generic looks to be the following:

    update-rc.d enable

    Link to Ubuntu documentation: https://wiki.ubuntu.com/SystemdForUpstartUsers

提交回复
热议问题