Home Explore Blog CI



man-pages

12th chunk of `journalctl.man`
6502e8626dc0e2ece10b5b30ca76291692c6911cfa5e5f720000000100000967
 enabled if the effective UID is not the same as the
           owner of the login session, see geteuid(2) and sd_pid_get_owner_uid(3). In secure mode, LESSSECURE=1 will be set when invoking the pager, and the pager shall disable commands that open or create new files or start
           new subprocesses. When $SYSTEMD_PAGERSECURE is not set at all, pagers which are not known to implement secure mode will not be used. (Currently only less(1) implements secure mode.)

           Note: when commands are invoked with elevated privileges, for example under sudo(8) or pkexec(1), care must be taken to ensure that unintended interactive features are not enabled. "Secure" mode for the pager may
           be enabled automatically as describe above. Setting SYSTEMD_PAGERSECURE=0 or not removing it from the inherited environment allows the user to invoke arbitrary commands. Note that if the $SYSTEMD_PAGER or $PAGER
           variables are to be honoured, $SYSTEMD_PAGERSECURE must be set too. It might be reasonable to completely disable the pager using --no-pager instead.

       $SYSTEMD_COLORS
           Takes a boolean argument. When true, systemd and related utilities will use colors in their output, otherwise the output will be monochrome. Additionally, the variable can take one of the following special values:
           "16", "256" to restrict the use of colors to the base 16 or 256 ANSI colors, respectively. This can be specified to override the automatic decision based on $TERM and what the console is connected to.

       $SYSTEMD_URLIFY
           The value must be a boolean. Controls whether clickable links should be generated in the output for terminal emulators supporting this. This can be specified to override the decision that systemd makes based on
           $TERM and other conditions.

EXAMPLES
       Without arguments, all collected logs are shown unfiltered:

           journalctl

       With one match specified, all entries with a field matching the expression are shown:

           journalctl _SYSTEMD_UNIT=avahi-daemon.service
           journalctl _SYSTEMD_CGROUP=/user.slice/user-42.slice/session-c1.scope

       If two different fields are matched, only entries matching both expressions at the same time are shown:

           journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097

       If two matches refer to the same field, all entries matching

Title: Environment Variables (cont.): $SYSTEMD_COLORS, $SYSTEMD_URLIFY and Examples
Summary
This section details the last two environment variables relevant to journalctl. The `$SYSTEMD_COLORS` variable controls whether systemd utilities use color in their output, with options to restrict the color palette. `$SYSTEMD_URLIFY` controls the generation of clickable links in the output. Following this, examples of basic `journalctl` commands are provided to illustrate how to display logs without arguments, filter by a single field, and filter by multiple fields simultaneously.