Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a laptop running linux, and I've installed various bits and pieces into /usr/local/bin. Some software has created subdirectories (e.g. firefox & blender), some has just gone into /usr/local/bin.

Is this right, that software creates subdirectories in /usr/local/bin, or would it be better to create a subdirectory in /usr/local?

share|improve this question

2 Answers 2

All software unique to a given box go under usr/local. The binaries go under bin, lbraries go under lib, config files under etc, and so on. So It is not right, that software creates subdirectories in /usr/local/bin, and it is not right to create a subdirectory in /usr/local. http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY

share|improve this answer
    
so when i download firefox and it extracts to a 'firefox' directory where do i put it? –  Simon Aug 22 '10 at 17:23

/usr/local is a good place to deposit software when you install them from compilation (./configure && make && make install). This is the default location for virtually every software compiled and installed by hand.

share|improve this answer
    
when i compile software, it will correctly put the binaries in /usr/local/bin, libs in /usr/local/lib, etc. but what about when i download a precompiled package such as firefox, which when i extract it it creates a 'firefox' directory? –  Simon Aug 22 '10 at 17:25
    
In such cases, the precompiled software is self-contained into that directory. You can put it wherever you like, while the most common are /usr/local/firefox and /opt/firefox. Just add some symlinks to the executable file, so it can be found in your $PATH (or change the $PATH to include these extra directories). See also: redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/… –  Denilson Sá Aug 22 '10 at 17:41
    
Ah, /opt it is then. Thanks. –  Simon Aug 22 '10 at 17:59

Your Answer

 
discard

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