What are the differences between the two following ways or starting something, first being:

/etc/init.d/redis-server start

And second:

/usr/bin/redis-server

I've never really fully understood why which is preferred over the other.

  • Might be related: askubuntu.com/questions/5039/… – Terrance Nov 23 '15 at 23:40
  • How do you stop the service? – muru Nov 23 '15 at 23:55
  • 1
    @KarlMorrison you shouldn't have to. There are different init systems (i.e., systems to manage services and boot), and naturally they all have different command sets. The service command is a wrapper script which calls the correct set of commands depending on the system. In this case, the same init.d script you mentioned - you shouldn't have to kill manually. If you do, it's a bug and should be reported. – muru Nov 24 '15 at 17:24
  • 1
    Also see: askubuntu.com/q/2075/158442 – muru Nov 24 '15 at 17:26
  • 1
    Also, do lookup the pkill command. – muru Nov 24 '15 at 17:28
up vote 0 down vote accepted

Whatever goes into /etc/init.d is a script that starts a service and may define appropriate level where the script runs - single user mod, multiuser, shutdown; it's not the service itself.

Whatever goes into /usr/bin is the actual server, it is the executable file.

The analogy from windows world would be .exe files vs scheduled services that call those .exe files

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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