brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: journalctl -e opens the pager at the end of the journal

Journalctl
~/tips/tip-journalctl-pager-end

journalctl -u nginx -e

Starts the pager at the last entries, limited to 1000 lines of the current boot.

The interesting line is almost always at the bottom, and -e starts there.

-e jumps to the end inside the pager. It also implies --lines=1000 and the current boot unless you say otherwise, so the pager never has to load the whole journal. You can still scroll up with the arrow keys.

journalctl -u nginx -e

It works only with the less pager, which is the default on most distributions. Without a pager, for example in a pipe, the flag has no effect and -n is the right tool.

Further reading: journalctl(1) manual page

More Journalctl tips journalctl -k -g 'killed process' --since "2 days ago" journalctl _PID=1 -b ls -lh /var/log/journal/*/*.journal~ Storage=volatile sudo journalctl --setup-keys All Journalctl tips (81) All topics

Link