Re: Why complicated directory structure in Linux
- From: Matt Giwer <jull43@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 05:46:34 GMT
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
.
- Follow-Ups:
- Re: Why complicated directory structure in Linux
- From: Odie Ferrous
- Re: Why complicated directory structure in Linux
- References:
- Why complicated directory structure in Linux
- From: mydejamail
- Why complicated directory structure in Linux
- Prev by Date: Re: Why complicated directory structure in Linux
- Next by Date: Re: Why complicated directory structure in Linux
- Previous by thread: Re: Why complicated directory structure in Linux
- Next by thread: Re: Why complicated directory structure in Linux
- Index(es):
Relevant Pages
|