Terminal Dojo
Help العربية Sign inGet started

Command library / journalctl

journalctl

BashDraft — pending expert review4 practice missions

Query the systemd journal (system and service logs)

Reads the systemd journal — the central, structured log almost every modern Linux service writes to. -u scopes it to one service, -b to the current boot, -f follows new lines live like tail -f, and -p filters by minimum severity.

Practice journalctl

Usage

journalctl [-u unit] [-b] [-f] [-p priority] [-n lines]

Options and flags

Examples

Common mistakes

journalctl -u sshd journalctl -u sshd.service

Unit names normally need their full suffix — 'sshd' alone often matches nothing; 'sshd.service' is the actual systemd unit name.

Related commands

grep