Follow a Service's Logs Live with journalctl -f -u
journalctl -f -u UNIT streams new journal entries for one systemd service in real time, with timestamps and metadata.
01Command
$ journalctl -u nginx.service -f02What it does
Because systemd services log to the journal rather than arbitrary files, `tail -f` on a log path often misses or duplicates output; journalctl is the reliable live view. Combining -u with -f prints only that unit's entries and keeps appending new ones, showing the unit's latest boot context. Add `-n 50` to start with the last 50 lines instead of the default ten, or `-p warning` to raise the severity floor.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- journalctl(1) - Query the systemd journalEvidence: -f, --follow shows only the most recent journal entries, and continuously prints new entries as they are appended; -u filters by unit.
Last verified: 2026-09-17 · Category: System & Settings
06Related solutions
Check how much space the binary journal consumes and permanently trim it by size, age, or file count.
One command that prints every interface with its state and IPv4/IPv6 addresses in a short table — the modern, memorable replacement for digging through `ifconfig` or the verbose `ip addr` output.
The routing table is the first thing to check when traffic leaves the wrong interface or the gateway seems dead — and `ip route show` is the quick, modern way to read it.