Managing Linux Services

Red Hat / CentOS

  1. Display all the available services
    /sbin/chkconfig --list
  2. Enable the service
    /sbin/chkconfig [name] on
  3. Disable the service
    /sbin/chkconfig [name] off
  4. Start the background service
    /sbin/service [name] start
  5. Stop the background service
    /sbin/service [name] stop
  6. Restart the background service
    /sbin/service [name] restart
  7. Display the background service status
    /sbin/service [name] status

Ubuntu

  1. Display all the available services
    N/A
  2. Enable the service
    /usr/sbin/update-rc.d [name] defaults
  3. Disable the service
    /usr/sbin/update-rc.d -f [name] remove
  4. Start the background service
    /usr/sbin/service [name] start
  5. Stop the background service
    /usr/sbin/service [name] stop
  6. Restart the background service
    /usr/sbin/service [name] restart
  7. Display the background service status
    /usr/sbin/service [name] status