Re: Why complicated directory structure in Linux



mydejamail@xxxxxxxxxxx wrote:

Why is Linux directory structure laid out so, what is the rationale

There is some documentation of this some place. It may have even come with your installation. Try googling.

Cruft from different implementations. With and without /local/ is an example.

Warning, giving any answer, no matter how correct, results in violent disagreements with much byteshed on both sides. I hereby ignore my own warning with some quick and dirty and unapproved-by-the-Great-Penguin answers.

Directories are really only to introduce some sort of organization and opinions vary widely on what is the best organization. That these are only opinions is what leads people to pound the keyboard for hours saying nothing. A few months ago one of the linux groups went on for days over whether or not usr was a contraction for user. If you think windows v. linux battles are bad ... lets hope this does not start one.

On a particular system users have a search path giving the order in which directories are searched such as /bin/:/usr/bin/:/usr/local/bin: More on this later.

such as

/bin

essential executables that link with the kernal such as shell commands

These are the most common user commands and so /bin should be the first in the path.

/usr/bin
/usr/local/bin

Binaries for all users.

The redhats put things in /usr/local/bin while the Fedora Cores put them mostly in /usr/bin

It does not matter which order these are in the search path.

/sbin

executables used by the systems to access things not essential to the core such as addressing particular filesystem types. Things that deal with motherboard issues for example.

Whereas ls is an essential shell command it has to know how to handle the file system type of which there are many too many types even though over half of them are the best there is.

/usr/sbin
/usr/local/sbin

both for executables used by root. Users can be given root privledges to each program individually.

and likewise for lib, share, libexec etc directories

lib/ and local/lib are like usr/bin and usr/local/bin

same for share and local/share.

There is no point to simplifying your directory system as apps will install themselves where they want and create the directory if necessary. /opt/ is one of the odd ones which java used at one time.

Do NOT move files around. Lets say you have rview 1.0 in /usr/local/bin and you think it is better in /usr/bin. When you upgrade to rview 1.1 the install will put it back in /usr/local/bin and create the directory if you have removed it. That sounds harmless but if your search path looks at /usr/bin first then it will execute the one in that directory and not find the upgrade in /usr/local/bin.

I can't think of any other mistakes I made or almost made at the moment.

--
Have you ever seen a pro-peace, anti-Israel Jew on TV? Why not?
What does that say about Jews?
-- The Iron Webmaster, 3689
nizkor http://www.giwersworld.org/nizkook/nizkook.phtml
Zionism http://www.giwersworld.org/disinfo/disinfo.phtml a4
.



Relevant Pages

  • Re: installing Text-Balanced module
    ... that means I have to install this module? ... Warning: ... One thing that puzzles me is that the search path does not include ...
    (perl.beginners)
  • activesync installation error
    ... I am attempting to install activesync 3.8 or 3.71 on a windows 2000 pro ... WARNING: Uninstall logging failed - uninstall will not work ... Copying static files to C:\Program Files\Microsoft ActiveSync_new ...
    (microsoft.public.pocketpc.activesync)
  • Re: disklabel error in 4.11 release
    ... I personally have no experience with disklabel so it took me a bit to track down, but it seems like the raw device is not allowing anything to edit the first sectors. ... Keep in mind that an Olive install effectively turns your BSD box into a Juniper box, so the boot procedure will be different, which is why I'm leaning toward this. ... olive1# disklabel ad4 ... WARNING: This package will load JUNOS 7.2R4.2 software. ...
    (freebsd-questions)
  • Re: activesync installation error
    ... Install Dir = C:Program FilesMicrosoft ActiveSync ... Change Install Dir = C:Program FilesMicrosoft ActiveSync_new ... WARNING: Could not create the main WCES registry keys Copying static files to C:WINNTsystem32 ...
    (microsoft.public.pocketpc.activesync)
  • Yum Problems, and Apt-Get Problems, Can Anyone help?
    ... .Package php-domxml needs libxsltbreakpoint.so.1, this is not available. ... am trying to install something. ... There are multiple versions of "autoconf213" in your system. ... you may remove that warning by setting the following ...
    (Fedora)