A small collection of Systemd commands, along with the Sysvinit counterparts.

Sysvinit CommandSystemd CommandNotes
service frobozz startsystemctl start frobozzUsed to start a service (not reboot persistent)
service frobozz stopsystemctl stop frobozzUsed to stop a service (not reboot persistent)
service frobozz restartsystemctl restart frobozzUsed to stop and then start a service
service frobozz reloadsystemctl reload frobozzWhen supported, reloads the config file without interrupting pending operations.
service frobozz condrestartsystemctl condrestart frobozzRestarts if the service is already running.
service frobozz statussystemctl status frobozzTells whether a service is currently running.
ls /etc/rc.d/init.d/systemctl (or) systemctl list-unit-files –type=service (or)
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 onsystemctl enable frobozzTurn the service on, for start at next boot, or other trigger.
chkconfig frobozz offsystemctl disable frobozzTurn the service off for the next reboot, or any other trigger.
chkconfig frobozzsystemctl is-enabled frobozzUsed to check whether a service is configured to start or not in the current environment.
chkconfig –listsystemctl list-unit-files –type=service (or) ls /etc/systemd/system/*.wants/Print a table of services that lists which runlevels each is configured on or off
chkconfig frobozz –listls /etc/systemd/system/*.wants/frobozz.serviceUsed to list what levels this service is configured on or off
chkconfig frobozz –addsystemctl daemon-reloadUsed when you create a new service file or modify any configuration

Note that all /sbin/service and /sbin/chkconfig lines listed above continue to work on systemd, and will be translated to native equivalents as necessary. The only exception is chkconfig –list.

Pin It on Pinterest

Share This