익명 14:42

What is the difference between “/usr/local” and ”/usr/share?”

What is the difference between “/usr/local” and ”/usr/share?”

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.

  1. 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.

  2. 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/bin files 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:

  3. 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.

  4. Are these bash scripts only simple wrappers for executables or what is the reason for them being there if they are architecture-independent?

  5. Is my reasoning correct or do I miss something?



Top Answer/Comment:

I’m way too late but for anyone coming across this:

  1. Yes, thats right.
  2. No, the /usr/local directory is a normal directory on the root partition. But it is not recommended to share it between machines. That doesn't mean you can't do it, but that's what it is meant for.
  3. Architechture dependent data can be stored in /usr/local/share for example rather than /usr/share.
  4. /bin is for the binaries, /usr is for the resources and settings.
상단 광고의 [X] 버튼을 누르면 내용이 보입니다