I originally posted this question over on AskUbuntu but it didn't get any traction so I'll ask here.

In ubuntu or linux in general is there a "correct" location to install services that you download from the internet and want to run. I would like to have services such as redis or ventrilo auto run but to me it doesn't make sense to put them in the ~/redis or ~/ventrilo directories since they aren't user specific.

Keep in mind that I'm relatively new to the linux world having been a .Net developer for about 4 years now.

  • Or RedHat. RedHat still has /etc/init.d for daemons. – Bill Bohrer Apr 19 '17 at 22:19

So according to the Filesystem Hierarchy Standard software manually installed should be placed into /usr/local/, see man hier for more details.

In the *nix world, services are called daemons and they're typically controlled by init scripts. Software installed using your distro's package manager (apt, yum, pacman) should have init scripts included. Your system's init scripts can be found in /etc/init.d/. If you're compiling/installing software manually, you may have to write your own init script. If thats the case, there's a template in /etc/init.d/skeleton

| improve this answer | |
  • 1
    +1 BUT: Most linux distros don't use SysV style init (/etc/init.d) anymore, and even fewer will in the future. While the init systems they do use (predominantly, systemd) are usually compatible with scripts placed in /etc/init.d, for the most part standard system daemons are not "controlled by init scripts" -- they're controlled by init, and started via whatever configuration method is used by the particular init system. I.e., most of them do not have scripts in /etc/init.d on most distros (notable exceptions being Debian and CentOS, but both of those are moving to systemd). – goldilocks May 30 '14 at 16:51
  • unix.stackexchange.com/a/480897/5132 /etc/init.d/skeleton is no more. – JdeBP Nov 10 '18 at 4:55

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.