Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For building apps from source like git or rails I've seen recommendations to install in both /opt or /usr/local.

From what I've read so for, the designated use for both is about the same and it amounts to merely a style issue.

Is there any practical difference? Best practices?

share|improve this question

I use /usr/local for stuff I put into the system, and I let third-party installers take /opt.

share|improve this answer

The FHS says:

A package to be installed in /opt must locate its static files in a separate /opt/ or /opt/ directory tree, where is a name that describes the software package and is the provider's LANANA registered name.

while /usr/local hold the usual /bin/, /lib, /etc, ... hierarchy

share|improve this answer

Personally, I like to install everything I build from source in /opt, and edit my $PATH accordingly. It instils a sense of (semi-) cleanliness, and it's easier to traverse the folder structure, perform updates etc. It just comes down to personal preference; one is not necessarily better than the other (just like you said, a style issue).

share|improve this answer

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.