Ubuntu 15.04 systemctl: command not found

13,232

Are you sure systemd is installed? It should provide systemctl:

$ dpkg-query -S /bin/systemctl
systemd: /bin/systemctl

You could also try the full path: sudo /bin/systemctl enable [email protected]

I'm on 16.04 LTS, which definitely requires systemd, so upgrading might be an idea if you haven't already …

Share:
13,232

Related videos on Youtube

Chris
Author by

Chris

Updated on September 18, 2022

Comments

  • Chris
    Chris over 1 year

    I am currently trying to install Syncthing and have it start automatically.

    I am following the guide Starting Syncthing Automatically - Using systemd.

    I have a file called "[email protected]" saved at /etc/systemd/system. So basically I am trying to achieve autostart by using systemd.

    The command to enable it is:

    systemctl enable [email protected]
    

    But this gives me the error:

    sudo: systemctl: command not found
    

    From what I know since 15.04 systemd is the replacement for upstart. But why is systemctl missing? Can I just install it and hope for the best?

    • EdiD
      EdiD over 8 years
      Place your service in /lib/systemd/system/ and try again
    • muru
      muru almost 4 years
      @abu_bua all these questions about systemctl you have edited are fundamentally and inextricably questions about systemd. There is no point to a separate tag about systemctl, at least not in any of the questions you have edited - they're all about systemd, its features and service management.
    • abu_bua
      abu_bua almost 4 years
      @muru On other sites like unix.stackexchange.com, serverfault.com, etc. they made a systemctl tag, which they also use beside systemd. Hence, for continuation I edited these questions. Btw: these sites even don't use a synonym for it.