Logs in Linux: journalctl and /var/log

Updated November 1, 2026

journalctl reads the system journal that systemd keeps; many services also write text logs under /var/log.

Common cases

journalctl -u nginx          # one service's logs
journalctl -f                # follow new entries (like tail -f)
journalctl -b                # logs since the last boot
journalctl --since today     # today's logs
sudo tail -f /var/log/syslog # an old-style text log
dmesg                        # kernel messages

Sample output

$ journalctl -u nginx
Jul 26 03:57:50 srv1 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Jul 26 03:57:50 srv1 systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.
...
Jul 26 03:58:20 srv1 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Jul 26 03:58:20 srv1 nginx[258]: 2026/07/26 03:58:20 [emerg] 258#258: "listen" directive is not allowed here in /etc/nginx/nginx.conf:84
Jul 26 03:58:20 srv1 nginx[258]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jul 26 03:58:20 srv1 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jul 26 03:58:20 srv1 systemd[1]: nginx.service: Failed with result 'exit-code'.
Jul 26 03:58:20 srv1 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

How it works: the journal and text files

systemd keeps its own journal in a binary format - that is what journalctl reads, so a plain cat will not work on it. The journal is easy to filter: by service (-u), by time (--since), by priority (-p err). Many programs still write text files under /var/log (syslog, auth.log, nginx logs) - you read those with the usual tail, less, grep. Kernel messages live apart and are shown by dmesg.

Common mistakes

-- No entries -- has two causes. First: you are not root. A normal user sees only their own messages, and journalctl says so: Hint: You are currently not seeing messages from other users and the system. and below it Users in groups 'adm', 'systemd-journal' can see all messages. Second: a typo in the unit name. journalctl -u nginxx gives the same -- No entries -- and exit code 0 - journalctl does not complain about a unit it has never heard of.

tail -f /var/log/syslog on a base Ubuntu 24.04 answers tail: cannot open '/var/log/syslog' for reading: No such file or directory. That file is written by rsyslog, which is no longer installed by default: the whole system log lives in the systemd journal. What stays under /var/log is per-program logs - /var/log/nginx, /var/log/apt, /var/log/dpkg.log.

-p err filters by the priority systemd assigned, not by the one the author meant. Everything a service prints to its own output lands in the journal as plain info, so the nginx line [emerg] "listen" directive is not allowed here in /etc/nginx/nginx.conf:84 never shows up under journalctl -u nginx -p err: you are left with systemd's own Failed to start nginx.service. Look for the reason in the full output of journalctl -u nginx -n 50.

In the book

This topic is covered in full in the chapter Logging and journald.

See also

Services: systemctl, The /proc filesystem.