Comments | SysV | Systemd |
---|---|---|
Start en service | service <navn> start | systemctl start <navn>.service |
Stop en service | service <navn> stop | systemctl stop <navn>.service |
Restarte en service | service <navn> restart | systemctl restart <navn>.service |
Reload en service | service <navn> reload | systemctl reload <navn>.service |
Service status | service <navn> status | systemctl status <navn>.service |
Enable service at startup | chkconfig <navn> on | systemctl enable <navn>.service |
Disable service at startup | chkconfig <navn> off | systemctl disable <navn>.service |
Check om en service er enable at startup | chkconfig <navn> | systemctl is-enabled <navn>.service |
Comments | SysV | Systemd |
---|---|---|
System halt | 0 | runlevel0.target, poweroff.target |
Single user mode | 1,s,single | runlevel1.target, rescue.target |
Multi user | 2 | runlevel2.target, multi-user.target |
Multi user med netværk | 3 | runlevel3.target, multi-user.target |
Eksperimental | 4 | runlevel4.target, multi-user.target |
Multi user med netværk og grafisk mode | 5 | runlevel5.target, graphical.target |
Reboot | 6 | runlevel6.target, reboot.target |
Emergency shell | emergency | emergency.target |
Skift til multi user runlevel / target | init 3 | systemctl isolate multi-user.target |
Check current runlevel | runlevel | systemctl get-default |
Change default runlevel | Ret i /etc/inittab | systemctl set-default multi-user.target |
Comments | SysV | Systemd |
---|---|---|
System halt | halt | systemctl halt |
Power off | poweroff | systemctl poweroff |
Restart | reboot | systemctl reboot |
Suspend | pm-suspend | systemctl suspend |
Hilbernate | pm-hilbernate | systemctl hibernate |
Follow system log file | tail -f /var/log/messages, tail -f /var/log/syslog | journalctl -f |