Let's say I write a mine.service file. Then I use systemctl enable mine.service.

If I later decide to edit mine.service, do I have to tell systemd that mine.service was changed? If so, how do I do that?


After you make changes to your unit file, you should run systemctl daemon-reload, as outlined here.

Reload systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload all unit files, and recreate the entire dependency tree. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay accessible.

You can then restart (or reload) your service as you desire with

systemctl restart your-service-name

(daemon-reload won't reload/restart the services themselves, just makes systemd aware of the new configuration)

  • 3
    I found I also needed to run a systemctl restart to actually restart the service itself... – hwjp Oct 4 '16 at 20:52
  • 11
    Just in case, daemon-reload isn't universal, have got to run systemctl --user daemon-reload for user services. – Alec Mev Jan 25 '18 at 22:06
  • As a note it also "delete the previous configuration created by generators" before rerunning them: freedesktop.org/software/systemd/man/systemd.generator.html – rogerdpack May 9 '19 at 17:22
  • i dont have systemctl... – The Fool Oct 30 '20 at 6:57
  • I’d you don’t have systemctl, then maybe you’re using something like other than SystemD. – GregL Oct 30 '20 at 11:05

As an addition to the answer above: In case you changed something in the [Install] directive, you may need to run sudo systemctl reenable YOURUNITFILE in order to recreate the symlinks in the .target directories.

  • This did the trick for me! Didn't get it why systemctl wasn't reloading the service file. – antonagestam Sep 21 '18 at 15:12

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.