Find out what broke your service on the last reboot
Logging & Journald
Find out what broke your service on the last reboot
🧩 The Challenge
You just rebooted a server after an update, and one of your critical services is acting up. It’s flapping, or not starting right. You try `systemctl status` but it just says “active (running)” or “failed” without enough context to figure out what initially went wrong. And you really need to see *its* logs from *the previous boot*, right when the system came back online and it first tried to start.
💡 The Fix
There’s a quick, direct way to pull up your service’s logs specifically from the boot *immediately before* the current one. It cuts through all the current noise and gets you straight to the initial error messages that started the whole mess.
journalctl -b -1 -u your_service_name.service
⚙️ Why It Works
The `-b -1` flag is your key here; it tells `journalctl` to display logs from the boot session that happened right before the current one. You then narrow it down to just your problem `systemd` unit with `-u`, giving you a laser focus on what you need.
🚀 Pro-Tip: Want to see a list of *all* boot sessions? Try `journalctl –list-boots`.
Linux Tips & Tricks | © ngelinux.com | 11/1/2026
