From Fedora Project Wiki

Revision as of 20:37, 9 September 2010 by Notting (talk | contribs) (Services)

This is a document to help system administrators who need to understand what commands in systemd replace their old workflow in SysVinit.


SystemVinit Command Systemd Command Notes
ls -al /etc/rc.d/init.d systemctl --all --type=service Used to list the services that can be started or stopped
chkconfig httpd --list Used to list what levels this service is configured on or off
chkconfig httpd --level 345 on Turn the service on for the next reboot
chkconfig httpd --level 345 off Turn the service off for the next reboot
service httpd start systemctl start httpd.service OR service httpd start Used to start a service (not reboot persistent)
service httpd stop systemctl stop httpd.service OR service httpd stop Used to stop a service (not reboot persistent)
service httpd restart systemctl restart httpd.service OR service httpd restart Used to stop and then start a service
service httpd reload systemctl reload httpd.service OR service httpd reload When supported, reloads the config file without interrupting pending operations.
service httpd condrestart systemctl reload-or-restart httpd.service OR systemctl condrestart httpd.service OR service httpd condrestart When supported, restarts if the service is already running.
Additional commands
In SysVinit, services can define arbitrary commands. Examples would be service iptables panic, or service apache graceful. Native systemd services do not have this ability.

Any service that defines an additional command in this way would need to define some other, service-specific, way to accomplish this task when writing a native systemd service definition.

Check the package-specific release notes for any services that may have done this.


runlevels are used with telinit and on the kernel command line in SystemVinit. These traditional ways of switching runlevels still work with systemd, but additionally, the following can be used instead.

SystemVinit Runlevel Systemd Target Notes
0 Halt the system.
1, s, single, emergency Single user mode.
2, 4 User-defined/Site-specific runlevels. By default, identical to 3.
3, Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.
5, Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.
6 Reboot

Changing runlevels:

SystemVinit Command Systemd Command Notes
telinit 3 systemctl isolate OR telinit 3 Change to multi-user run level.
sed s/^id:.*:initdefault:/id:3:initdefault:/ ln -sf /lib/systemd/systemd/ /etc/systemd/system/ Set to use multi-user runlevel on next reboot.