Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trying to understand the main purpose behind the following directories...
/srv
/bin
/sbin
/etc
/vat
/usr/bin
/usr/sbin
The few times I've installed programs in Linux (CentOS), I have trouble determining where the file(s) were actually placed. Mozilla, VM Ware Tools, etc. I'm hoping that if I understand why those directories are there, it'll help me to determine where to look for stuff.
Can anyone just summarize for me the purpose of those directories and what typically is put in there? Thanks!
And Linux follows most of the rules--most of the time.....
Actually, these are not rules. It is more like a convention or a standard left over from Unix--which is at its core a general-purpose, multi-user OS.
/bin binaries
/sbin system binaries--ie things that a mere user would not normally need
/usr for users (as opposed to, I suppose, administrators)
/etc things that did not fit anywhere else--ie afterthoughts. Actually, this seems to be where most config files are
the FHS is in my sig if you want to take a look at it. I've always considered /usr to be a short hand of user (that's how i pronounce it).
The structure confused me at first, but now i figure since there is no 'registry' as such, just paths and variables, that the *nix way works quite well. However it is known for some distros to stray away from the standard, which can create confusion.
You can use tools such as locate and find if you have to search for files, whereis can be used for binaries too (providing they are in your path).
I read somewhere that usr is actually an acronym for Unix System Resources, which would make sense as it's where binaries and libraries usually live.
That would make me more misguided than originally believed....
What's interesting about this is that the way I actually find /usr used is in a way that implies "user".
Well, going back in history, /usr was just said to be a "general-pupose[sic] directory" and was "usually a mounted file system." That's from the V7 hier(7) man page -- complete with typo and that appears to have been that way in v6 as well. That's just the systems I have access to. It does seem possible that it was for "Unix System Resources" although I haven't been able to find that reference in documentation and I find it improbable. I actually think it's likely to be a back-ronym and not the real etymology of it.
Finally, although the /bin directory does, in fact stand for "binary," it is
not necessarily an accurate reflection of colloquial understanding. Because
/usr stands for UNIX System Resources, it doesn't necessarily mean that the
directory's name necessarily has anything to do with what people commonly
regard as system resources for the UNIX operating system (ask, and the
majority of people will say that it stands for "user").
In fact, making usr stand for UNIX System Resources is a retronym. As a 25+ year user of UNIX and UNIX-like systems, I can assure you that this is really a retronym and not the initial meaning. Actually /usr was where user files were stored. Had it actually stood for something, surely hier(7) [the manual describing the filesystem hierarchy] would have said so instead of saying things like "the majority of user programs..." or whatever.
If, indeed, you find a reference from Dennis Ritchie or Ken Thompson with that usr does stand for UNIX System Resources, I'll be quite surprised.
And yes, this quoted message is accurate. /usr/dmr (for example) was Dennis Ritchie's home directory. /usr/ken would be Ken's and so on. I was going to post a relevant chunk from /etc/passwd of that era... but I've thought better of it. The point remains the same and I really don't know how much I can quote from the systems without pushing the limits of licensing. Still... it is very likely it was short for "user" or "user programs and data" and it certainly acted like /home does today.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.