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 -f --no-tail follows a service and prints its whole history first

Journalctl
~/tips/tip-journalctl-follow-no-tail

journalctl -u nginx -f --no-tail

Prints all matching entries and then keeps following, instead of starting with the last ten lines.

Follow mode usually shows only a few lines of history. This flag removes the limit.

--no-tail undoes the line limit, so -f prints everything that matches and then keeps following. For a service with a small log that is a complete picture on one screen, from the first line to the live one.

journalctl -u nginx -f --no-tail

On a busy service the output can be huge. Add --since to keep it manageable.

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