Skip to main content

Service / Daemon

For systemd (Ubuntu 16, Red Hat 7)

For System V

Add / Delete service

# Red Hat
chkconfig { --add | --del } <service>

Enable / Disable service auto start

# Ubuntu <= 14
update-rc.d <service> { enable | disable }

# Red Hat <= 6
chkconfig <service> { on | off }

Start / Stop service

# Ubuntu <= 14 and Red Hat <= 6
service <service> { start | stop }

Show service status

# Ubuntu <= 14 and Red Hat <= 6
service <service> status