Difference between revisions of "SysV, SystemD and UpStArt"
From Linuxintro
imported>ThorstenStaerk |
imported>ThorstenStaerk |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
SysV is a framework for [[scheduling tasks]] to start at boot time. It is beeing successed by systemd and upstart. This affects how services are started and stopped. With systemd you start a service like | SysV is a framework for [[scheduling tasks]] to start at boot time. It is beeing successed by systemd and upstart. This affects how services are started and stopped. With systemd you start a service like | ||
/etc/init.d/[[ntp]] start | /etc/init.d/[[ntp]] start | ||
Line 13: | Line 12: | ||
|- | |- | ||
| find out if service ''foo'' is running || /etc/init.d/''foo'' status || systemctl status ''foo'' | | find out if service ''foo'' is running || /etc/init.d/''foo'' status || systemctl status ''foo'' | ||
+ | |- | ||
+ | | schedule service ''foo'' to start on boot || chkconfig ''foo'' on || chkconfig ''foo'' on | ||
+ | |- | ||
+ | | change "runlevel" to multi-user || init 2 || systemctl isolate multi-user.target | ||
|} | |} | ||
+ | |||
+ | = SystemD = | ||
+ | SystemD cannot only manage services, but also targets. Targets are sets of services. They differ from runlevels in that multiple of them can be active: | ||
+ | <pre> | ||
+ | # systemctl list-units --type target | cat | ||
+ | UNIT LOAD ACTIVE SUB JOB DESCRIPTION | ||
+ | basic.target loaded active active Basic System | ||
+ | cryptsetup.target loaded active active Encrypted Volumes | ||
+ | getty.target loaded active active Login Prompts | ||
+ | </pre> |
Latest revision as of 08:40, 21 January 2016
SysV is a framework for scheduling tasks to start at boot time. It is beeing successed by systemd and upstart. This affects how services are started and stopped. With systemd you start a service like
/etc/init.d/ntp start
With SystemD you do it with
systemctl start ntp
what you want to do | how you do it with SysV | how you do it with SystemD |
---|---|---|
start service foo | /etc/init.d/foo start | systemctl start foo |
stop service foo | /etc/init.d/foo stop | systemctl stop foo |
find out if service foo is running | /etc/init.d/foo status | systemctl status foo |
schedule service foo to start on boot | chkconfig foo on | chkconfig foo on |
change "runlevel" to multi-user | init 2 | systemctl isolate multi-user.target |
SystemD
SystemD cannot only manage services, but also targets. Targets are sets of services. They differ from runlevels in that multiple of them can be active:
# systemctl list-units --type target | cat UNIT LOAD ACTIVE SUB JOB DESCRIPTION basic.target loaded active active Basic System cryptsetup.target loaded active active Encrypted Volumes getty.target loaded active active Login Prompts