I have one systemd service which runs with systemctl --user start test_unit@random_arguments. How could I use journalctl to filter all logs of test_unit? If it supports "follow mode", that's even better.

1 Answer 1


If this is a user unit, use the --user-unit option:

journalctl -f --user-unit=test_unit@random_arguments

Otherwise, filter the unit with _SYSTEMD_UNIT:

sudo journalctl -f _SYSTEMD_UNIT=test_unit@random_arguments
  • Thanks. The --user option saves my day. journalctl --user -u test_unit@* -f works
    – Guisong He
    Apr 3, 2019 at 11:06
  • 1
    Right, --user-unit combines --user and -u ;-). Apr 3, 2019 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.