Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What are the "standards" -- should I put application (not just binary, but entire distribution) to /usr/local or /usr/local/share.

For example scala or weka -- it contains examples, binaries, libraries, and so on. So it would be




Since I am the only admin it is not a big deal for me, but I prefer to using something which is widely used, not with my own customs.

Important: I am not asking about cases, where you should split app into /usr/local/bin, /usr/local/lib and so on. Rather I am asking about case when you have to keep one main directory for entire application.

share|improve this question
I think /opt is more customary in this sort of context. –  Faheem Mitha Sep 13 '11 at 8:56
@Faheem Mitha, very good point. Thanks to you I found such explanation "/opt/'provider' directory tree, similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\"Program Name" from linuxtopia.org/online_books/linux_beginner_books/… Could you please post your comment as answer, so I would mark it as THE answer? Thank you. –  greenoldman Sep 13 '11 at 10:22
Posted as requested. Thanks. –  Faheem Mitha Sep 14 '11 at 1:41
@greenoldman: also please realize that keeping all files in a single dir is not the "standard" way to install applications in Unix. /opt is indeed the right answer, but it is not "widely used" by traditional Unix/Linux software. There are great reasons to split your files in multiple dirs, and also to differenciate /usr from /usr/local –  MestreLion May 1 '13 at 4:06
For example, keeping all executables from all applications in a single /usr/bin (or /usr/local/bin) allows your $PATH to reach all software without needing to edit it for each software, a concept that does not exist in Windows –  MestreLion May 1 '13 at 4:12

3 Answers 3

up vote 5 down vote accepted

I think /opt is more standard in this sort of context. See the relevant section in the Filesystem Hierarchy Standard.

share|improve this answer

You should only use /usr/local/share for files which are not specific to a particular architecture / OS version.

After that it's up to you whether you distribute the files between the existing subdirs of /usr/local or if you create a new dedicated directory in /usr/local (but the latter will not already exist on the executable PATH, the LD_LIBRARY_PATH, nor the MANPATH).

Have a look at the FHS

share|improve this answer
Thank you. So, if it is an analogy from Windows, it should be /usr/local/SPECIAL_APP and inside there should be its subdirectories, right? –  greenoldman Sep 13 '11 at 17:38
@greenoldman: nope. No analogy will fit because Windows and Linux use different models: In windows, you usually keep all files in a single dir, where in Linux you usually split them over bin, share, lib, etc –  MestreLion May 1 '13 at 4:09

Until /opt became common, the usual place was /usr/local/lib/<package>.

share|improve this answer
From what I read, /opt is pretty common, only not used widely, but this is not a surpise if you think of the amount of packages available in repositories. –  greenoldman Sep 13 '11 at 11:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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