Ask Your Question

Revision history [back]

Yes, you can also use -u as a shortcut (rather than _SYSTEMD_UNIT), and it also accept patterns rather than exact unit names. Also, the .service part is optional: journalctl -u sshd would also work. You can also filter messages based on number of boots, or by date.

I have not seen any pattern based message filtering in journalctl; but you can do what I do: use grep!

journalctl -u sshd | grep "input_userauth_request:"