Using CheatSheets To Apply Best Practices

Cheatsheet: Systemd/Systemctl

Cheatsheet: Systemd/Systemctl

1.1 Systemd manage service

Name Summary
Check service systemctl status $service_name, systemctl -l status $service_name
Service cfg file /lib/systemd/system/

1.2 Systemd check log

Name Summary
Check log of systemd service journalctl -u docker, journalctl -p err -u docker
Filter log by a timeslot journalctl --since 10:00 --until "1 hour ago" -u docker
View kernel messages journalctl -k
Check logs with error level journalctl -p err -b

1.3 Systemd Trouble Shooting

Name Summary
Force machine reboot, if reboot doesn’t work systemctl --force reboot, systemctl --force --force reboot

1.4 More Resources

License: Code is licensed under MIT License.


Leave a Reply

Your email address will not be published. Required fields are marked *