Within CentOS-7 does a change in the options within /etc/systemd/system.conf of systemd require a reboot or will "systemctl daemon-reload" suffice?


No, daemon-reload will reload all unit files, not the configuration for systemd itself. However, # systemctl daemon-reexec will re-execute systemd and cause it to digest its new configuration in the process.

From the systemctl man page:

       Reexecute the systemd manager. This will serialize the manager
       state, reexecute the process and deserialize the state again. This
       command is of little use except for debugging and package upgrades.
       Sometimes, it might be helpful as a heavy-weight daemon-reload.
       While the daemon is being reexecuted, all sockets systemd listening
       on behalf of user configuration will stay accessible.

When the man page says daemon-reexec is useful for package upgrades, it in large part means that this command executes whatever new binaries there are and re-processes its configs. HOWEVER, the RPM that we use to upgrade systemd already contains a script to do this, so it is usually never needed in the case of a normal upgrade.

Or you can reboot. Either will do.

  • 3
    Note that the systemd RPM package includes a scriptlet that will already daemon-reexec when the package is upgraded, so you don't need to do this manually in that situation. – Michael Hampton Sep 28 '16 at 2:25
  • 1
    Just about the only thing that really needs a reboot anymore is the kernel. Most if not all services restart themselves (if they were already running) from within RPM scripts during upgrade using systemctl try-restart. – Michael Hampton Sep 28 '16 at 2:45
  • 2
    @MichaelHampton it is really a little more tricky: not only kernel, but also libc (and, sometime, device-mapper userland also) upgrades require a full reboot. Sure, you can pin-point and restart each affected services, but as basically all services are linked against libc, well, it is generally faster to reboot... – shodanshok Sep 28 '16 at 7:37
  • 1
    @Motivated libc is not a service, rather the GNU C Library, which is linked by almost all linux executable. So, after a libc upgrade, you should restart any running program/process; the easier method is to reboot the machine. – shodanshok Feb 3 '19 at 8:11
  • 1
    @Motivated The answer is speaking of scripts in RPM packages, which are used by Red Hat derived distributions, but not by Debian derived distributions. These use different packaging methods, but also call systemctl to restart services or systemd itself. – Michael Hampton Feb 3 '19 at 14:45

Had a good look at getting this working, you need to restart the services as well on the server :(

First the command above:

systemctl daemon-reexec


systemctl system.slice restart

Once done, its done, but am wondering about the overhead of this running all the time.

  • One would not run this all the time, but only when it is necessary to restart systemd and rebooting is not preferable. – Michael Hampton Sep 16 '20 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.