Dave's Brain

Browse - Computer Tips - How can I see logs from a systemd unit?

Date: 2018jan2
OS: Linux
Keywords: systemctl, systemd

Q.  How can I see logs from a systemd unit?

A.  `systemctrl status MYUNIT` gives some and journalctl gives it all.

journalctl --unit=MYUNIT
eg
journalctl --unit=httpd
To see the last entries:
journalctl --unit=MYUNIT | tail
eg
journalctl --unit=httpd | tail

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.