Having to manage a few production servers over different Linux distributions, I find it hard to remember the exact name of the service to restart/stop.
Is there anyway systematic way to determine the name of a running service, and subsequently being able to run
service <service name> status/stop/reload/start
commands?
2
Answers
Generally, programs that execute tasks in the background are normally known as “services” and “daemons”.
We can use “service” or “systemctl” to manage these servcies.
Example:
-service service-name start
-systemctl start service-name
Mostly custom service files will be at “/etc/init.d/” directory and custom systemd files will be at “/etc/systemd/system/” directory
for centos 7 use