services:cheatsheet
This is an old revision of the document!
Services - Cheatsheet
Service-related commands
systemd | SysVinit | |
---|---|---|
Start a service | systemctl start service_name.service | service service_name start |
Stop a service | systemctl stop service_name.service | service service_name stop |
Restart a service | systemctl restart service_name.service | service service_name restart |
Reload a service | systemctl reload service_name.service | service service_name reload |
Service status | systemctl status service_name.service | service service_name status |
Restart a service if already running | systemctl condrestart service_name.service | service service_name condrestart |
Enable service at startup | systemctl enable service_name.service | chkconfig service_name on |
Disable service at startup | systemctl disable service_name.service | chkconfig service_name off |
Check if a service is enabled at startup | systemctl is-enabled service_name.service | chkconfig service_name |
Create a new service file or modify configuration | systemctl daemon-reload service_name.service | chkconfig service_name --add |
NOTE: New versions of systemd support systemctl start service_name etc.
services/cheatsheet.1467809759.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)