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 --user shows the logs of the services in your own session

Journalctl
~/tips/tip-journalctl-user-journal-own-services

journalctl --user -u myapp

Shows the logs of services that run in your own user session instead of the system.

A service I start as a normal user does not log into the system journal, so the plain command can look empty.

--user shows messages from the services of the current user, and -u then works like --user-unit for those. --system does the opposite and shows only system services and the kernel. Without either flag you get everything you are allowed to see.

journalctl --user -u myapp

The man page says --user works only when persistent logging is enabled through Storage= in journald.conf.

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