Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux journalctl command

Read systemd journal entries. Use -u to filter by service unit.

systemd

Syntax

Command form
journalctl [OPTIONS...] [MATCHES...]

Common options

7 options
OptionWhat it does
-u, --unit=UNITShow messages for a systemd unit.
-f, --followFollow new journal entries.
-b, --boot[=ID]Show entries from the current boot or a selected boot.
-n, --lines=NShow the most recent N entries.
--since=TIME / --until=TIMERestrict entries to a time range.
-p, --priority=LEVELFilter by priority and more severe levels.
--no-pagerWrite output directly instead of opening a pager.

Usage examples

3 examples

Read systemd journal entries. Use -u to filter by service unit.

journalctl -u ssh --since today

Show the last 50 SSH unit messages without a pager.

journalctl -u ssh -n 50 --no-pager

Show warning and more severe messages from this boot.

journalctl -b -p warning

Notes

Journal access and retention depend on system configuration and user permissions. Avoid sharing logs before checking for secrets or personal data.