91

My question is simple: how do I tell journald to re-read its configuration file without rebooting?

I've made some changes to /etc/systemd/journald.conf and I'd like to see if they are correct and everything works as I expect.

I do not want to reboot.

sourcejedi
  • 50,249
lorenzog
  • 1,413

2 Answers2

111

To control running services with systemd, use the systemctl utility. This utility is similar to the service utility provided by SysVinit and Upstart. Among others:

  • systemctl status systemd-journald indicates whether the service is running and additional information if it is.
  • systemctl start systemd-journald starts the service (systemd unit).
  • systemctl stop systemd-journald stops the service.
  • systemctl restart systemd-journald restarts the service.
  • systemctl reload systemd-journald reloads the service's configuration if possible, but will not kill it (so no risk of a service interruption or of disrupting processing in progress, but the service may keep running with a stale configuration).
  • systemctl force-reload systemd-journald reloads the service's configuration if possible, and if not restarts the service (so the service is guaranteed to use the current configuration, but this may interrupt something).
  • systemctl daemon-reload reloads systemd's own configuration.
  • 1
    It's true. But you should update your systemd (use v227...). See https://github.com/systemd/systemd/issues/2236 – Evgeny Jan 12 '16 at 22:54
  • 2
    Atleeast on CentOS 7 the service name is systemd-journald – varesa Oct 29 '16 at 09:36
  • 29
    systemctl reload systemd-journald gives me error Failed to reload systemd-journald.service: Job type reload is not applicable for unit systemd-journald.service. on Centos 7 – IanB Mar 04 '17 at 04:50
  • 5
    See https://unix.stackexchange.com/questions/379288/ for problems with this. – JdeBP Jul 19 '17 at 13:01
36

systemctl restart systemd-journald does the trick.

I'm answering it myself as googling it does not return any useful page.

lorenzog
  • 1,413
  • 3
    " If systemd-journald.service is restarted using systemctl restart or equivalent operation instead of a pair of separate systemctl stop and systemctl start commands (or equivalent operations), these stream connections are not terminated and survive the restart. It is thus safe to restart systemd-journald.service" https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html#Stream%20logging – No_name May 02 '20 at 05:24