“Sudo: Systemctl: Command Not Found” When Run on Centos 6.6

I am using CentOS 6.6. When I try running the command

sudo systemctl start elasticsearch

I get an error like this:

sudo: systemctl: command not found

As per my understanding systemctl is not supported in CentOS versions 6.9 and before.

Can someone please let me know what the equivalent of systemctl is in CentOS version 6.6?

1

1 Answer

You OS does not use systemd or systemctl but still uses init.d or service commands:

Eg:

sudo service {servicename} {stop|start|restart}

Or

/etc/init.d/{service} {stop|start|restart}

Note that even on newer systems which use systemd, you can generally use the sudo service XYZ restartsyntax and it will still work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest