systemctl : comand not found 16.04 server

40,511

Unless removed after installation of 16.04, /bin/systemctl should be installed. It is part of the systemd package.

In Ubuntu 16.04, init is implemented as systemd. This replaces upstart by default, although a 16.04 system can be configured to use upstart.

Byte Commander is correct, but did not post his comment as the answer.

An important exception: If you upgraded from 14.04 to 16.04, then your system is still running upstart, not systemd and systemctl will not function as you're expecting in your question. I suspect this is the explanation for the problem you're having. If allowed to stand, the upgraded system will continue to develop problems when new software is added or updates are made by software that assumes systemd is used because the version number is 16.04, and all the other permutations of assumptions leading to errors that are possible. This is one case that argues for doing a clean install rather than upgrading if at all possible.

How can you tell if your system is running systemd or upstart as init?

# init --help

... and observe the output.

This article will help further, including instructions on switching between implementations of init: https://wiki.ubuntu.com/SystemdForUpstartUsers

Share:
40,511

Related videos on Youtube

Tim
Author by

Tim

My name is Tim. I've graduated from the University of Nottingham with a First Class Computer Science BSc with Hons. In my spare time I do computer programming, often C or JavaScript, but also shell scripts, and answering questions on Stack Exchange. I used to spend most of my time on Ask Ubuntu; now I mostly browse the HNQ or Meta Stack Exchange. If you want to contact me it's [email protected] Do you need a reliable VPS? Try Digital Ocean. Sign up with this link for $10 free. One of my favourite sites is Kiva.org, a micro-funding organisation that allows people to lend money via the Internet to low-income entrepreneurs and students in over 80 countries. Kiva's mission is “to connect people through lending to alleviate poverty.” With just $25 you can make a difference - and 99% of loans are paid back in full - so you can lend again and again!

Updated on September 18, 2022

Comments

  • Tim
    Tim over 1 year

    I am getting the error systemctl: command not found in Ubuntu 16.04 server.
    How can I fix it?

    I'm trying to run:

    sudo systemctl start openvpn@server 
    
    • Admin
      Admin over 7 years
      Doesn’t the command line tell you what package to install? Have you tried it?
    • Admin
      Admin over 7 years
      The executable should be located in /bin/systemctl and be able to run without specifying the full path. It is part of the systemd package which comes preinstalled with 16.04. Please show the output of apt policy systemd to verify you have the necessary package installed. Also show the output of ls -l /bin/systemd and echo $PATH please.