The journal, and what it keeps
The journal is a structured, indexed log with fields you can select on - which makes journalctl | grep the slow, lossy way to use it. This guide covers whether it persists across a reboot, selecting by unit, time, priority and arbitrary field, and the traditional text files that are still being written alongside it.
Operations Deployment Guide 15 of 38 Intermediate
- PlatformsUbuntu 26.04 LTS + AlmaLinux 10.2
- LVM2.03.31 (Ubuntu) / 2.03.36 (AlmaLinux)
- nftables1.1.6 (Ubuntu) / 1.1.5 (AlmaLinux)
- TimeAbout 18 min
systemd 257 on RHEL 10. Persistence depends on whether /var/log/journal exists, which is a distribution default rather than a systemd one - so check it rather than assuming.
- Firewallufw 0.36.2 enabled but reporting inactive / firewalld active
- Network confignetplan + systemd-networkd / NetworkManager 1.56.0
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LFCS-A01 | 192.168.0.70 | Ubuntu 26.04 LTS | Primary host - most guides run only here | 2 Core | 4 GB | 50 GB |
| LFCS-C01 | 192.168.0.72 | AlmaLinux 10.2 | The other distribution - dnf, firewalld and NetworkManager | 2 Core | 4 GB | 50 GB |
This guide includes
Use this for reading logs on either family. This matters because priorities nest - -p err returns everything more urgent than err as well, so a count that looks like a count of errors is not one.
- finding where the log actually lives, and whether it survives a reboot
- selecting by unit, by time and by boot
- seeing that priorities nest, and what that does to a count
- selecting on fields, which is why it is not a text file
- reading the kernel buffer and previous boots, and writing to the journal yourself
Before you start
-
Where the log actually lives, and whether it survives a reboot
-
Selecting by unit, by time and by boot
-
Priorities nest, which is why -p err returns more than errors
-
The fields, which are why it is not a text file
-
The kernel buffer, and previous boots
-
The traditional files, which are still being written
-
Writing to it, and keeping it off the disk
-
Whether the journal survives a reboot