I have this software package which installs itself to /usr/local/mypackge, with a bunch of subdirs. In bin/ I have linked code, as ELF executables, in /share/doc I have documents, etc. Now suppose I've written some wrapper script(s) calling binaries from bin/, and I want it to be part of the package. Where should it be placed?

On typical Linux systems, you find shell scripts in /usr/bin and /usr/sbin, same as the actual linked binaries - should I do the same? Should I create a scripts/ subdir? Something else?

  • For future reference, once a question has been answered, it is considered good etiquette not to change the question so radically that it invalidates the answers completely. If you found that you asked the wrong question, it is better to ask a new one. Jan 24, 2015 at 9:01

1 Answer 1


On a typical Linux system, there are two kinds of scripts:

  • Scripts that are meant to be regularly used by the end-user. For these scripts it is customary that you can't easily tell if you are invoking a script or a ELF executable. They are located in the /bin, /usr/bin or /usr/local/bin folders and don't have an extension to their name, just like all executables.
  • Internal scripts for a larger package. These scripts are typically not meant to be used by the end-user, so they are located outside the typical paths with executables, often in /var/lib/<package>.

Where to install your scripts depends on the category that they fall in.

  • Umm, I confused the source package directory tree and the installed directory tree. Rephrased the question. At any rate, the question remains - where do I install the scripts? to the same place as the linked binaries, or elsewhere?
    – einpoklum
    Jan 24, 2015 at 8:34
  • @einpoklum: I rewrote my answer. Jan 24, 2015 at 8:56

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