Fix: Systemctl Command not Found
By Kevin Arrows May 11, 2019 0 1 minute read
Systemctl is a Systemd utility for controlling services and processes on Linux
distributions. By using the systemctl command, you can easily start and stop
services through Terminal. However, several users are getting �systemctl: command
not found� error when they try to run systemctl command. This issue can mostly
occur on outdated versions of Linux operating systems, which does not support
Systemd.
Systemctl command not found
What is causing the �Systemctl command not found� error?
According to our investigations, the main cause of the problem is Outdated
Operating System. Some outdated Linux distributions are using SysV init and Upstart
instead of Systemd, due to which systemctl commands will not work in Terminal.
Systemd was introduced in the latest versions of operating systems and it isn�t
available for the outdated versions.
Now that you know the reason due to which the problem is triggered, we will move on
towards the solution.
Service Command for Outdated Linux Distributions
If your system is using Upstart rather than Systemd, then you have to try the
commands that work for Upstart. You need to try a command equivalent of systemctl
for the outdated operating systems to start a service. Also, you must install
service on your system before starting it with a command through Terminal.
Tip: Use sudo command to install, start and stop applications that require root
privileges.
Press CTRL + ALT + T keys together to open Terminal and type the following
command to start a service:
sudo service elasticsearch start
Note: It will take 5-10 seconds to start.
You can confirm the status of a service by using this command:
sudo service elasticsearch status
Starting a service and checking status
And some services like elasticsearch have their own command to test:
curl �X GET �[Link]
Testing the elasticsearch service
Bonus: Systemctl Command for Latest Linux Distributions
Systemd has replaced the SysV init as the init system on most of the Linux
distributions. Systemctl command will work for the latest Linux distributions
without any errors as shown below:
Press CTRL + ALT + T keys together to open Terminal
Type the systemctl command to start a service:
sudo systemctl start elasticsearch
Starting service by using the systemctl command