Can I reload a single systemd unit/service file after its modification (in [Service] section) without reloading all unit files? By online search, everyone talk about systemctl daemon-reload or systemctl --user daemon-reload. This makes me feel really bad. I only want to reload one unit file configuration instead of many. Is that possible to reload the modified one only in systemd? Thanks a lot.

  • Are you confusing reload with daemon-reload? Or in other words, why just only daemon-reload a single unit/service? – Thomas Aug 24 '19 at 9:20
  • @Thomas I am not confusing reload and daemon-reload. I just want to daemon-reload a single unit service file because I modified the unit service file (the [Service] section). I heard daemon-reload will rerun all generators and reload all unit files from this link. Thanks. – sgon00 Aug 24 '19 at 9:26
  • daemon-reload it not harmful and won't do a systemctl reload .... As far as I know you cannot daemon-reload a single unit. – Thomas Aug 24 '19 at 9:29
  • @Thomas ok thanks. I just friendly clarify once again I am NOT looking for systemctl reload at all. I am looking for daemon-reload a single unit file only. And thanks for the comment. That means it's not doable then. If you are sure it's not doable, you can provide it as the answer. I can then accept it. – sgon00 Aug 24 '19 at 9:31

systemctl daemon-reload cannot be run on a single unit file. What it does is reloading the systemd configurations of unit files, rerun all generators and recreates the dependency tree.

I guess since the dependency tree is regenerated it doesn't make sense to run this on a single unit as several unit files may have changed and the dependency tree then could be wrong.

| improve this answer | |

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.