systemctl: used to introspect and control the state of the systemd system and service manager
Sysvinit Command | Systemd Command | Notes |
---|---|---|
service frobozz start | systemctl start frobozz.service | Used to start a service (not reboot persistent) |
service frobozz stop | systemctl stop frobozz.service | Used to stop a service (not reboot persistent) |
service frobozz restart | systemctl restart frobozz.service | Used to stop and then start a service |
service frobozz reload | systemctl reload frobozz.service | When supported, reloads the config file without interrupting pending operations. |
service frobozz condrestart | systemctl condrestart frobozz.service | Restarts if the service is already running. |
service frobozz status | systemctl status frobozz.service | Tells whether a service is currently running. |
ls /etc/rc.d/init.d/ | systemctl list-unit-files --type=service (preferred) ls /lib/systemd/system/*.service /etc/systemd/system/*.service | Used to list the services that can be started or stopped Used to list all the services and other units |
chkconfig frobozz on | systemctl enable frobozz.service | Turn the service on, for start at next boot, or other trigger. |
chkconfig frobozz off | systemctl disable frobozz.service | Turn the service off for the next reboot, or any other trigger. |
chkconfig frobozz | systemctl is-enabled frobozz.service | Used to check whether a service is configured to start or not in the current environment. |
chkconfig --list | systemctl list-unit-files --type=service(preferred) ls /etc/systemd/system/*.wants/ | Print a table of services that lists which runlevels each is configured on or off |
chkconfig frobozz --list | ls /etc/systemd/system/*.wants/frobozz.service | Used to list what levels this service is configured on or off |
chkconfig frobozz --add | systemctl daemon-reload | Used when you create a new service file or modify any configuration |