I'm trying to figure out Upstart and I'm not sure if I should put them in




And what is the difference between the locations?


/etc/init is for system jobs - those services which are started independent of any user being logged in. These are typically system services. By default, commands are run as root unless setuid is used.

~/.config/upstart is for session jobs - these are run for a user logged into the GUI.

What does your Upstart job do?

  • Is it performing some function for some logged in user, specific to them? Use ~/.config/upstart.
  • Does it not need a user logged in do its work, or need to run when the system starts? Use /etc/init.
  • I put a script in ~/.config/upstart/ but when I run "sudo service <service_name> start", it says "unrecognized service". Do you know why this is? – Ryan Stull Apr 9 '15 at 19:28
  • 1
    @RyanStull the service command deals exclusively with system jobs and sysvinit scripts. Simply use start service_name, or initctl start service_name. – muru Apr 9 '15 at 19: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.