Skip to content

/flags/systemd/journalctl-since-until

journalctl --since and --until: show logs from a time range

The commands on this page have not been executed by our verification runner yet.updated
tool
systemd
command
journalctl
flag
-S, --since= / -U, --until=
default
unset: the whole journal from the oldest entry to now
since
systemd 195

journalctl --since=TIME shows journal entries on or newer than a time, and --until=TIME entries on or older than a time. Short forms are -S and -U. They take absolute dates like "2026-10-24 09:00", the words yesterday, today, tomorrow and now, or relative times like -1h and "30 min ago". Combine them with -u to read what one service logged during an incident.

Syntax

bash
journalctl --since "2026-10-24 09:00" --until "2026-10-24 10:30"
journalctl -S today
journalctl -S yesterday -U today            # all of yesterday
journalctl -u nginx --since "30 min ago"
journalctl -u nginx -S -2h -p warning       # last two hours, warning and worse
journalctl --since "2026-10-24 08:00 UTC" --no-pager > incident.log

The manual documents both options since systemd 195. The time syntax is defined in systemd.time(7).

Accepted values

ValueMeaning
"2026-10-24 09:15:30"Exact local time
"2026-10-24"Time omitted, so 00:00:00 of that day
"09:15"Date omitted, so today; seconds omitted, so :00
today / yesterday / tomorrow00:00:00 of the current day, the day before, the day after
nowThe current time
-1h, -30min, +2hRelative to now: minus or plus a time span
"30 min ago", "2 days ago"Same as the minus form, written with ago
"2026-10-24 08:00 UTC"Time zone after a space (UTC, an IANA zone such as Europe/Rome, or an offset)
2026-10-24T08:00:00ZRFC 3339 form with T and a suffix offset
@1761292800Seconds since the UNIX epoch

Time span units include s, min (or m), h, d, w, M (months of 30.44 days) and y; spaces between number and unit may be omitted.

Interactions

  • With -b. -b restricts to one boot and --since further narrows the window; when they do not overlap you get no entries (see journalctl -b).
  • With -f. --since decides where the output starts; -f then keeps following new entries.
  • With -r. --reverse shows the newest first inside the range.
  • Output timestamps. --output=short-full prints timestamps in exactly the format --since accepts, so you can copy a line's time into the next query.

Pitfalls

  • Quote values with spaces. journalctl --since 1 hour ago passes only 1 as the value and hour and ago as separate arguments, which journalctl does not treat as part of the time; write --since "1 hour ago" or -S -1h.
  • Old entries may be gone. The range cannot reach before the oldest entry still stored; journald rotates and vacuums files, and with volatile storage everything before the last boot is lost.
  • Permissions. Users who are not in the systemd-journal, adm or wheel group see only their own entries, so a range can look empty without sudo.

FAQ

Why does journalctl --since 1 hour ago fail?

Without quotes the shell passes only 1 as the value and hour and ago as separate arguments, which journalctl does not read as part of the time. Quote the whole expression, --since "1 hour ago", or use the compact form --since -1h.

Is --since inclusive?

Yes. --since shows entries on or newer than the given time, and --until entries on or older than it.

Which time zone does journalctl use for --since?

The local time zone, unless you add one to the timestamp, such as "2026-10-24 08:00 UTC" or an RFC 3339 offset like 2026-10-24T08:00:00+02:00.

Sources