I expected systemctl --user enable SERVICE to start the service on login, which is not happening. Then what is it supposed to mean?

  • Is your user session using systemd? – CameronNemo Dec 1 '14 at 6:52
  • 1
    What exactly do you mean? Can I check this in any way? I'm running arch linux. And systemd is the default since 2012-10-13. I installed my OS this summer. Does this answer your question? – x-yuri Dec 1 '14 at 7:13
  • 3
    Have you followed wiki.archlinux.org/index.php/Systemd/User ? – garethTheRed Dec 1 '14 at 8:31
  • Apparently, yes. But I missed the fact that when it starts, it brings up the target default.target. I just copied the file as is and failed to realize that I've got yet to change the target. – x-yuri Dec 3 '14 at 21:54

It makes the unit start on first login of a user, but for that corresponding unit file should have WantedBy = default.target or something along the lines. Because when user instance of systemd starts, it brings up the default.target target.


systemctl --user enable SERVICE will do nothing unless the related unit file has an [Install] section. the [Install] section lets systemd know which symlinks to set up with enable is used. From the docs:

Unit files may include an "[Install]" section, which carries installation information for the unit. This section is not interpreted by systemd(1) during runtime; it is used by the enable and disable commands of the systemctl(1) tool during installation of a unit.

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.