Linux

journalctl

Safesystemd logs

journalctl -xe

Inspect service/system logs; -u scopes a unit, -f follows.

Examples

  • journalctl -u nginx -n 100Last 100 lines for nginx

Syntax

journalctl -u <svc> | -xe | -f

Before you run it

Read-only.

Used when you see

Service won't start / keeps crashing
2
Chase the cause in logsUse -u and -xe
See the whole flow →
Scheduled job didn't run
2
Check the journal for cron records at that time
See the whole flow →
Logs are eating the disk
1
Check journal usage and vacuum by time/size--disk-usage, then --vacuum-time=14d.
See the whole flow →

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store