Code & computing / QUICK REFERENCE

Systemd Service and Journal Inspection

Read-only systemctl and journalctl commands for finding loaded services, checking unit states and narrowing logs without changing a running host.

32 entries

Find services and distinguish states

See loaded service units
systemctl list-units --type=service --no-pager

Shows units currently in manager memory, normally active/pending/failed. Not a complete installation inventory. [1]

Include inactive loaded services
systemctl list-units --type=service --all --no-pager

Adds inactive loaded units, but not every installed unit-file template. [1]

Inventory installed service files
systemctl list-unit-files --type=service --no-pager

Shows installed unit-file enablement states, not live ActiveState or whether the service is running. [1]

List loaded failed services
systemctl list-units --type=service --state=failed --no-pager

Restricts the loaded-unit view to failed state. A cleared/unloaded historical failure may no longer appear. [1]

Human-readable unit status
systemctl status example.service --no-pager

Includes state and potentially recent journal lines; it can expose sensitive log text. Substitute a known authorized unit. [1]

Machine-readable unit properties
systemctl show example.service -p LoadState,ActiveState,SubState,UnitFileState --no-pager

Parse these named properties rather than scraping colored or wrapped status output. Properties vary across types/releases. [1]

Check one service state
systemctl is-active example.service

Exits successfully when this unit is active. A service can be active but not healthy at the application level. [1]

Beware multiple-unit is-active
systemctl is-active one.service two.service

The exit code is zero if ANY matched unit is active, not only if both are active; inspect each independently for an all-up check. [1]

Inspect unit files, dependencies and timers

Enabled is not active
systemctl is-enabled example.service

Reports unit-file enablement; a disabled unit may still be manually active, and an enabled one may be stopped. [1]

Show effective unit file and drop-ins
systemctl cat example.service

Prints base unit and known drop-ins. The output can include sensitive Environment lines or filesystem paths: handle privately. [1][3]

Inspect dependencies
systemctl list-dependencies example.service --no-pager

Displays a hierarchy of requirement/wants dependencies; it is not a chronological restart history. [1]

Inspect reverse dependencies
systemctl list-dependencies --reverse example.service --no-pager

Shows units that depend on the given unit within supported dependency types. It does not prove startup ordering. [1][3]

Inspect timer schedule state
systemctl list-timers --all --no-pager

Shows NEXT/LAST scheduling and the service activated by timer units; missing triggers may reflect loaded/manager state. [1]

Inspect socket activation
systemctl list-sockets --all --no-pager

Shows known socket units and their listening endpoints; do not assume a listener is publicly reachable. [1]

Show unit file paths
systemctl show example.service -p FragmentPath -p DropInPaths --no-pager

The manager reports its loaded main configuration file and drop-in paths; an empty path may mean an implicit/transient unit. [1][3]

Detect manager configuration staleness
systemctl show example.service -p NeedDaemonReload --no-pager

Reports whether the manager thinks this unit needs a reload. This read-only diagnostic does not reload any service. [1]

Narrow journal logs to a unit, boot or time

Recent lines for this boot
journalctl -u example.service -b -n 50 --no-pager

Show up to the latest 50 accessible entries for the named unit in the current boot. Missing lines may be permissions/retention. [2]

Recent lines across available boots
journalctl -u example.service -n 25 --no-pager

Query up to 25 most recent matching journal entries from accessible files, without restricting to the current boot. [2]

A prior recorded boot
journalctl -u example.service -b -1 -n 30 --no-pager

Query previous boot only if that boot is retained and visible; absence does not prove the service never ran. [2]

Time interval in UTC
journalctl -u example.service --since "2026-10-26 14:00:00 UTC" --until "2026-10-26 15:00:00 UTC" --no-pager

Time filter is inclusive within the named interval. Explicit UTC avoids operator-local timezone assumptions. [2][4]

Recent relative time
journalctl -u example.service --since "-1 hour" -n 50 --no-pager

Time is evaluated relative to command execution; last 50 still limits output. Do not call these permanent time windows. [2][4]

Warning and more severe
journalctl -u example.service --priority=warning -n 50 --no-pager

Priority limit includes warning and more severe; user-level readability depends on journal permissions. [2]

Precise timestamp format
journalctl -u example.service --output=short-iso-precise -n 20 --no-pager

ISO-like timestamps with microseconds can aid comparisons; timezone presentation follows documented output convention. [2]

List retained boots
journalctl --list-boots --no-pager

Summarizes boot IDs and first/last journal timestamps for boots available to your permissions. [2]

Output, privacy and read-only boundaries

Display message text alone
journalctl -u example.service -n 20 -o cat --no-pager

Omit metadata in human view, not a privacy sanitizer: messages may contain secrets. Preserve provenance elsewhere if needed. [2]

Regex filter on message text
journalctl -u example.service --grep="error|fail" -n 20 --no-pager

Search only matching MESSAGE fields; unstructured spelling and severity may differ from priority filters. [2]

Machine-readable log lines
journalctl -u example.service -n 10 -o json --no-pager

Emits newline-delimited JSON objects, not one JSON array. Individual fields can contain identifying material. [2]

Limit JSON output fields
journalctl -u example.service -n 10 -o json --output-fields=MESSAGE,PRIORITY --no-pager

Limit explicitly reported fields; check actual output and never assume logs are anonymized. [2]

Check journal storage footprint
journalctl --disk-usage

Displays disk space occupied by accessible journals; not a count of application incidents. [2]

Verify a known offline journal file
journalctl --verify --file=/path/to/copy.journal

Verify an intentionally selected copied journal file in your own workspace. Do not rotate/vacuum or mutate live journals. [2]

Inspect an authorized user unit
systemctl --user status example.service --no-pager

Queries the user service manager, not system services. Requires a running/accessible user manager. [1]

Inspect authorized user-unit journal
journalctl --user -u example.service -n 20 --no-pager

Queries the user journal; permissions and persistent storage affect availability. This differs from -u on the system journal. [2][5]

Reserved placement, separate from reference controls. No ad network is active.

Updated systemd 259.5 on VPS, upstream systemd 262 manual inspected 26-Oct-2026

Sources

  1. systemctl — inspect/control systemd units (inspection commands only) ↗
  2. journalctl — print/filter systemd journal entries ↗
  3. systemd.unit — unit configuration and dependency semantics ↗
  4. systemd.time — UTC, calendar and relative-time parsing ↗
  5. systemd-journald — journal storage and permissions ↗