1

I have a NFS-mounted home directory where I keep some executable programs for different OS and machine architectures. (A particular executable is built for one particular architecture only.) I have to store these executables in different bin directories (one bin directory for each OS/machine combination) so that I can easily put those directories in PATH.

Is there a conventional place to put executables for a particular OS/architecture?

The best I could find was MultiarchSpec - Filesystem layout | Ubuntu Wiki. It's only for libraries, e.g. /lib/x86_64-linux-gnu - it doesn't say anything about executables.

Currently I have this:

d=~/".local/$(uname | tr A-Z a-z)-$(uname -m | tr A-Z a-z)/bin"
if [ -d "$d" ]; then
    export PATH="$PATH":"$d"
fi
1

While the current version of the FHS does not discuss locations of binaries for different architectures, a related issue came up in their bugtracker. This proposal could be extended to include the OS as well, but that should be discussed in the FHS mailing list.

In short: no standard exists (yet) and every site is free to choose its own, whatever is suited best for the particular requirement. If your PATH setup above works for you, it's the right setup :-)

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.