Ubuntu – systemctl : comand not found 16.04 server

16.04serversystemd

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 

Best Answer

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

Related Question