Skip to content



analyze slow boot times

list how long it took for systemd units to initialize:

systemd-analyze blame

output example:

2min 158ms systemd-networkd-wait-online.service


all things DNS

change dns resolver

get current status and dns server:

resolvectl status

change to another DNS server:

edit /etc/systemd/resolved.conf and change the DNS line. for example:


if you want to use DNS over TLS:


restart service:

sudo systemctl restart systemd-resolved.service

verify again (see above)

change hostname

sudo hostnamectl set-hostname my-awesome-host

depending on your setup you might still need to update your /etc/hosts file as well

clear dns cache

resolvectl flush-caches


resolvectl statistics

logs: journalctl / systemd journals

configure journal / log usage

it might be a good idea to limit the disk usage of your systemd journals. To do this, edit the file: /etc/systemd/journald.conf

control how much disk space the journal may use up at most:


control how large individual journal files may grow at most:


and restart things

systemctl daemon-reload # for good measure
systemctl restart systemd-journald.service

log disk usage

check current disk usage of systemd journals:

journalctl --disk-usage

clean up some old logs:

journalctl --vacuum-size=100M

timers (better cronjobs!)

todo.. write something somewhere about the use of systemd-timers instead of cronjobs.

create your own timer / cronjob

create your service unit:

place it somewhere in /etc/systemd/system/restic_backup.service for example

Description=restic systemd service



create your timer:

place it in the same folder but name it .timer, like this: /etc/systemd/system/restic_backup.timer

Description=restic systemd timer



there are many different ways when the service should run, like with OnUnitActiveSec every 24 hours including a randomized delay of 1h.

here's the documentation for more ways when system should execute something

reload and enable the service:

systemctl daemon-reload
systemctl enable restic_backup.timer

disable timer

systemctl disable name.timer

list timers

systemctl list-timers

working with services

debugging: read and follow service logs output

read logs:

journalctl -u your-name.service

tail log:

journalctl -f -u your-name.service

list active services

the service might be active, but exited already since it was just initializing or checking something

systemctl list-units --type=service --state=active

list running services

systemctl list-units --type=service --state=running