skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. for centos 7 use

    systemctl list-unit-files
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search