System and processes
The journalctl command
Reads the systemd journal, where kernel and per-service messages are stored. It is the first place to look when a service fails or the system misbehaves.
Most useful options
-u <unidad>Only messages from that service. You can repeat -u for several units.-fFollows the log live, like tail -f.-n <líneas>Shows only the last n lines.-b [-1]Messages from the current boot; -1 is the previous one, useful after a freeze.-p <nivel>Filters by priority: emerg, alert, crit, err, warning, notice, info or debug.--since <fecha>From that date and time. Accepts formats like 2026-11-03 08:00 or today.-kOnly kernel messages, like dmesg.Copy-ready examples
$ journalctl -u nginx -n 20The last 20 lines of the nginx service.Example output
Nov 03 09:41:12 servidor nginx[912]: 2026/11/03 09:41:12 [error] 912#912: *88 open() "/var/www/html/favicon.ico" failed (2: No such file or directory)
$ journalctl -f -u sshShows SSH login attempts live. Useful when testing a configuration change.$ journalctl -b -1 -p errErrors from the previous boot, useful after a crash.$ journalctl --since 2026-11-03 --until 09:00Only the given time window.$ sudo journalctl --vacuum-size=200MShrinks the journal by deleting the oldest archived files until it uses 200 MB.You can try them in the browser terminal: it does not touch your computer.
Common errors
| Message | Cause | Fix |
|---|---|---|
| -- No entries -- | The filter matches nothing: a misspelled unit, a date range with no records or a cleared journal. | Check the name with systemctl list-units --type=service and widen the range with --since. |
| Hint: You are currently not seeing messages from other users and the system. | Your user is not in the adm or systemd-journal groups, so you only see your own messages. | Use sudo journalctl, or add your user to those groups and log out to apply it. |
| No error message | The journal grew too large and the oldest files were deleted. Check the size with journalctl --disk-usage. | Set a limit with SystemMaxUse in journald.conf if you need more history. |
Typical mistakes
- Without root or the right groups, you only see your own messages.
Differences from similar commands
Security
The journal can store paths, IP addresses, user names and, sometimes, passwords a program wrote by mistake. Review it before pasting it into a forum or ticket, and limit who can read it with the systemd-journal group. Strip them before sharing any log output.
FAQ
Does the journal survive a reboot?
It depends on /var/log/journal. If it exists the journal is persistent; if not, it lives in memory and is lost at boot.
How do I see only the errors of one service?
Combine -u and -p: journalctl -u nginx -p err shows only entries marked as error or more severe.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course