If I do:
journalctl -u my-service
then a Shift-F
to follow while paging, how do I (interrupt to abort)
without exiting the pager?
With less
, I typically just ^C
, but if I do that in journalctl, it exits the entire pager.
journaldlesssystemd
If I do:
journalctl -u my-service
then a Shift-F
to follow while paging, how do I (interrupt to abort)
without exiting the pager?
With less
, I typically just ^C
, but if I do that in journalctl, it exits the entire pager.
Best Answer
You are using
less
at that point, but ^C is behaving differently due to how it was invoked byjournalctl
. The flags that journalctl passes toless
include the following defaults:Of these, I think the "K" option applies here:
So, setting $SYSTEMD_LESS in your environment and omitting the "K" option should resolve the issue, it didn't work on my test on Ubuntu 16.04:
However, you can get the behavior you want confirm that the K flag is related by comparing the behavior of the following variations: