Inhaltsverzeichnis

systemd

Service/daemon handling
alte Befehle systemd
/etc/init.d/NAME start|reload|restart|stop

oder

service NAME start|reload|restart|condrestart|stop

ggf. sind weitere Modi möglich oder einige Modi nicht möglich

systemctl start|reload|restart|condrestart|stop NAME.service
Logging
journalctl -b

1)

Bootmeldung
journalctl -b -p err
Priorität Error oder seit dem boot anzeigen
journalctl -p warning --since="2018-08-20 00:00:01"
Alle Meldungen mit warning oder höher seit dem 20.08.2018 00:00:01
journalctl -f
dem Systemprotokoll folgen
journalctl -u SERVICE

Alternativ einer bestimmen Binärdatei

journalctl /usr/sbin/httpd
Nur die Logdateien eines bestimmten Dienstes zeigen
Systemstatus
alte Befehle systemd
halt systemctl halt alts the system
poweroff systemctl poweroff Powers off the system
reboot systemctl reboot Restarts the system
pm-suspend systemctl suspend Suspends the system
pm-hibernate systemctl hibernate Hibernates the system
pm-suspend-hybrid systemctl hybrid-sleep Hibernates and suspends the system

Komponenent von systemd

Konfiguration

aktivierte unit-files anzeigen

systemctl list-unit-files | grep enabled

autostart

systemctl enable DIENST.service
Created symlink from /etc/systemd/system/multi-user.target.wants/DIENST.service to /lib/systemd/system/DIENST.service.

geänderte unit files einlesen

systemctl daemon-reload

escaping in unitfiles

systemd-escape 'my string'

systemd-escape How to escape spaces in systemd unit files?

Container systemd-nspawn

https://wiki.debian.org/nspawn https://blog.selectel.com/systemd-containers-introduction-systemd-nspawn/

1)
vorher:
dmesg [-T]