5

I install .zip / .tar.gz programs in ~/.local/bin, but Ubuntu have /usr/local directory with content same as in ~/.local.

So, what is difference between this directories except for sudo access?

Lev Lunev
  • 51
  • 1
  • 3
  • Is locale and local the same @Jeremy? – George Udosen Apr 22 '18 at 13:31
  • This answer in the flagged duplicate explains it pretty well: https://askubuntu.com/a/955971/3739 – Jeremy Apr 22 '18 at 13:32
  • locale and local mean two different things. Locale refers to the place on earth you're from, whereas local is part of the directory structure. Edit: Sorry, I understand your question, good point – Jeremy Apr 22 '18 at 13:33
  • Is OP asking for locale or local? I think your misunderstanding the question! – George Udosen Apr 22 '18 at 13:35
  • @george Yep, good point, the answer linked in the comment is constructive none-the-less. I've dropped the flag. – Jeremy Apr 22 '18 at 13:36
  • @GeorgeUdosen: Not quite. The answers to your linked question focus on the “hidden” nature of dot-prefixed directories. – David Foerster Apr 24 '18 at 09:06
  • I'd vote for removing the "duplicate" flag. I think this question is more specific than the other one, and the answer is better, while [what-is-the-difference-between-local-and-local-in-ubuntu](https://askubuntu.com/questions/978654/what-is-the-difference-between-local-and-local-in-ubuntu) asks for `local` vs `.local`, which is related but more vague, even though a good answer might address the purpose of specific folders. – kca Jan 13 '23 at 11:24

2 Answers2

8

/usr/local is a place where software usable by all users can be installed by an administrator.

~/.local/bin is a place where a user can install software for their own use.

There is some messiness in the history of the directory structure used in different distros and communities, but this covers the basic differences.

Jeremy
  • 2,796
  • 4
  • 26
  • 37
4

The ~/.local is intented for user-only use for example by installing a 3rd-party software that does not come from the repositories in ~/.local/bin you will have it access you and only you.

Whilst the /usr/local is intented for stuff that is used for more that one user. For example /usr/local/bin has executabled that are 3rd-party but from repositories and are available to all users.

Dimitrios Desyllas
  • 1,225
  • 17
  • 35