Red Hat / CentOS
- Display all the available services
/sbin/chkconfig --list
- Enable the service
/sbin/chkconfig [name] on
- Disable the service
/sbin/chkconfig [name] off
- Start the background service
/sbin/service [name] start
- Stop the background service
/sbin/service [name] stop
- Restart the background service
/sbin/service [name] restart
- Display the background service status
/sbin/service [name] status
Ubuntu
- Display all the available services
N/A
- Enable the service
/usr/sbin/update-rc.d [name] defaults
- Disable the service
/usr/sbin/update-rc.d -f [name] remove
- Start the background service
/usr/sbin/service [name] start
- Stop the background service
/usr/sbin/service [name] stop
- Restart the background service
/usr/sbin/service [name] restart
- Display the background service status
/usr/sbin/service [name] status