systemd replaces upstart and init
The systemd
daemon replaces Upstart for managing system run levels and services. Replacing init
, systemd
is the first process that starts after the system boots, and is the final process that is running when the system shuts down. systemd
controls the final stages of booting and prepares the system for use. systemd also speeds up booting by loading services concurrently.
systemctl Command Equivalents
The following table shows the nearest equivalent Oracle Linux 7 systemctl
command for various system management commands used in Oracle Linux 6.
OL6 Command | OL7 Equivalent | Description |
---|---|---|
chkconfig --list name | systemctl is-enabled name | Check whether a service is enabled to start at boot time. |
chkcondig name off | systemctl disable name | Disable a service from starting at boot time. |
chkconfig name on | systemctl enable name | Enable a service to start at boot time. |
halt | systemctl halt | Halt the system |
pm-hibernate | systemctl hibernate | Put the system into hiberation |
pm-suspend | systemctl suspend | Suspend the system |
pm-suspend-hybrid | systemctl hybrid-sleep | Put the system into hibernation and suspend its operation |
poweroff | systemctl poweroff | Power off the system |
reboot | systemctl reboot | Reboot the system |
runlevel | systemctl list-units --type target | Display the currently active targets, which taken as a group constitute the nearest equivalent that systemd has to a run level. |
service name start | systemctl start name | Start a service |
service namestatus | systemctl status name | Display the status of a service |
service name stop | systemctl stop name | Stop a service |
telinit runlevel | systemctl isolate name.target | Change the systemd target |
As well as services (name.service
) and targets (name.target
), other types of unit that you can manage in systemd
include devices (name.device
), file system mount points (name.mount
), and sockets (name.socket
).
For example, the following command instructs the system to mount the temporary file system (tmpfs
) on /tmp
at boot time:
root@ol7# systemctl enable tmp.mount
systemd Target Equivalents
The following table shows the nearest equivalent systemd
targets to the run levels that are used in Oracle Linux 6.
OL6 Run Level | OL7 Eqivalent | Description |
---|---|---|
0 | poweroff.target runlevel0.target |
Shutdown and power off the system. |
1 | rescue.target runlevel1.target |
Set up a rescue shell. |
2 | multi-user.target runlevel2.target |
Set up a non-graphical, multi-user system. |
3 | multi-user.target runlevel3.target |
Set up a non-graphical, multi-user system with networking. |
4 | multi-user.target runlevel4.target |
User defined (or not used). |
5 | graphical.target runlevel5.target |
Set up a multi-user system with networking and display manager. |
6 | reboot.system runlevel6.target |
Shut down and reboot the system. |
The runlevel*
targets are implemented as symbolic links.
The nearest equivalent systemd
target to the Oracle Linux 6 run levels 2, 3, and 4 is multi-user.target
.
You can use the following commands to display the current default systemd
target and to configure a new default target:
root@ol7# systemctl get-default root@ol7# systemctl set-default name.target
If required, you can create customized versions of the targets that are defined in /usr/lib/systemd/system
.
For more information, see the systemctl(1) and systemd.unit(5) manual pages and http:// freedesktop.org/wiki/Software/systemd/.