1

Linux has /usr/local and ~/.local (for gnome and Ubuntu). So what does "local" mean? What is the 'remote' which contrasts with this 'local'?

Does it have anything to do with networks where all the computers share the same system files?

TriskalJM
  • 2,393
  • 1
  • 19
  • 20
Cedar
  • 748
  • 6
  • 21

2 Answers2

4

It's typically reserved for "locally installed" applications, meaning stuff you install yourself, not stuff that came with your distro. It's a pretty old naming convention:
http://objectroot.org/articles/brief-history-of-hier/

From https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard:

Tertiary hierarchy for local data, specific to this host.

There is no real "remote" counterpart, the correct counterpart is more like "global" instead (meaning functionality that everyone else has, versus functionality that only this local system has).

Jeff Breadner
  • 1,366
  • 9
  • 19
1

it has something to do with the history of it, originally, '/usr' was representing the home directories of the users, recent implementations of Linux, '/usr' is where user programs and data are.

Where the original idea behind '/usr/local' was to have a local read-only copy of '/usr' directory on a machine along side of '/usr' folder that mounted from somewhere else, recently, '/usr/local' folder is to be used by the user when installing softwares 'locally'. It needs to be safe from being overwritten when the system software is updated by the 'globally' softwares installed on '/usr' folder by operating system.

Abdullah Shahin
  • 1,002
  • 15
  • 19
  • What kind of systems was the original idea for? What would that somwhere else be, the somewhere from which `/usr` is mounted? – Cedar Aug 19 '17 at 12:45
  • it was a few years before the Linux systems came into play, when the ethernet was created, in the 80's, the idea of making "diskless workstations" appeared because of disk storage was relatively expensive at that time, but they needed to move some "variable data" out of "/usr" folder to share this folder among different hosts to make that happen, this is where "/var" folder created at the first place, and "/usr/local" was the read-only copy of that "somewhere else" /usr folder. however, the "diskless workstations" disappeared, but "/var" folder sticks. – Abdullah Shahin Aug 19 '17 at 13:04
  • So both `/usr/local` and `/var` would be per-workstation, whereas the rest of the `/usr` folder would the same for all workstations on a given host. Per-workstation read-only stuff is put in `/usr/local` while per-workstation read-write files (logs, caches) are in `/var`. Correct? – Cedar Aug 19 '17 at 13:38
  • And also, even though `/var` and `/usr/local` "belong" to the workstations, they are really just stored in the host in separate places for each workstation, and mounted when the workstations log in. Right? – Cedar Aug 19 '17 at 13:39
  • 1
    ok, so some folders like log and spool were under /usr folder, they moved to /var folder, so, the idea was to separate the host specific files from shared files, other workstations can benefit from applications installed under "/usr" of other machine by simply by mounting it under their local "/usr/local" folder which simply costs no extra disk space locally. so, /var and /usr belong to the workstation while /usr/local was mounted from somewhere else at that time. – Abdullah Shahin Aug 19 '17 at 14:12