/usr/local and /usr/share detailed explanation
Andrew Mclaughlin
I am afraid this is another of FHS questions but I was not able to find more detailed explanation which I feel I need. Yeah, I know about Uni FHS and etc, but what still feels like lacking clarification is /usr dir and it's contents. I believe this is partly due to the fact, that I am used to Linux instalations occupying only one partition with exception of /home.
As I understand, its content is to be shared among multiple machines so it is (could be) mounted from some 'shared' hdd.
It also contains the binaries not so critical as in /bin and /sbin. Correct me if I am wrong.
Its description as "read only" confuses me a little bit.
- Is by this meant that users are not allowed to write here, only super users?
Now, my focus here is /usr/local and /usr/shared.
/usr/local as
Tertiary hierarchy for local data, specific to this host
should mean it is not shared.
- Am I right in the assumption that it is not part of that 'shared' hdd but it is just a mounting point for a hdd/partition dedicated to one machine? (so basically not stored with other
/usr/binfiles at all)
I am also not so sure if I understand the meaning of /usr/share either. This should contain
Architecture-independent (shared) data
The fact that /usris supposed to be shared among multipple machines and users does not help grasping the use of word 'shared' here which is meant to be shared across different architectures.
This makes me wonder:
- Where are architecture-dependent data? Everywhere else? Does this mean that machines with the different architectures would not share /usr only /usr/share? (thus making it another physically separate partition)
Here I would expect mainly non-native code binaries, scripts, resource and textual help files for apps (which is in part so) but I see bash scripts in /usr/binand suddenly I have a feeling that not all system-noncritical architecture-independent scripts are confined to this directory.
Are these bash scripts only simple wrappers for executables or what is the reason for them being there if they are architecture-independent?
Is my reasoning correct or do I miss something?
1 Answer
So Im way too late but for anyone coming across this:
- Yes, thats right.
- No, the /usr/local directory is a normal directory pn the root partition. But it is not recommended to shqre it between machines. That doesnt mean you cant do it, but thats what its meant for.
- Architechture dependent data can be stored in /usr/local/share for example rather than /usr/share.
- /bin is for the binaries, /usr is for the resources and settings.