🧀 Learn Linux

Advanced · Management Services

journalctl: View service logs

Put in free practice

Syntax

journalctl [-u nginx] [-n rows] [-f]

Options

-u
View by teaching services
-n
Number of last lines
-f
Teaching Snapshot

Examples

journalctl -u nginx -n 1

Usage and sandbox support

Only the teaching nginx log is shown; the real -f will continue to follow.

Hands-on exercises

Full documentation ↗

Related commands