User Tools

Site Tools


unix:systemd

This is an old revision of the document!


Systemd cheatsheet

systemctl

"service"

systemctl stop myservice
systemctl start myservice
systemctl restart myservice
systemctl reload myservice
systemctl status myservice

"chkconfig"

systemctl enable myservice
systemctl disable myservice
systemctl is-enabled myservice

"chkconfig --list"

systemctl list-unit-files --type=service

or simply:

systemctl

Reload systemd

Reload systemd, scanning for new or changed units:

systemctl daemon-reload

Restart unit on failure

[Service]
Restart=on-failure
RestartSec=30

cfr systemctl edit

Specifiers

AKA builtin “variables” for unit files(i.e. hostname): see systemd.unit(5)

journalctl

# Logs from last boot
journalctl -b

# Follow logs
journalctl -f

# From kernel
journalctl -k

# From a specific binary
journalctl /usr/bin/pippo

# In reverse order (newest first)
journalctl -r
unix/systemd.1523977376.txt · Last modified: 2018/04/17 15:02 by ap

Informativa sui cookie