35

I find more and more tools that put executables into ~/.local/bin. I am old and for me ~/bin is the place in my $HOME for executables.

Where did this crazy new fashion originate? Why are people doing this? How widespread is it? Is it formalized anywhere? It is not in the XDG directory specification.

There is a related question: Which distributions have $HOME/.local/bin in $PATH?

A comment to another question refert to https://www.python.org/dev/peps/pep-0370 which had it back in 2008 already: Why did this program install into ~/.local/bin ... thats the first time I have seen that happen?

  • Here is a guess: To avoid annoying people with creating a lot of strange subdirs in $HOME, 'bin' was hidden in ~/.local But how about ~/Desktop and ~/Downloads would one ask? – hschou Jun 14 '17 at 05:03
  • 1
    It's not in $PATH in Ubuntu 14.04 - but it is there in 16.04. So far I have no packages using that ~/.local/bin, but then I don't think any packages have automatically put files into ~/bin either. Maybe that's the principle behind it - maybe packages should not automatically install files into ~/bin which is for the user to use? – Joe P Jun 14 '17 at 07:55
  • @hschou, whilst I agree with you with regards to ~/Downloads and ~/Desktop, I think that hiding a directory holding binaries is a spectacularly bad idea. What was so bad about ~/bin or at a stretch, ~/bin/python? – Graham Nicholls Aug 30 '19 at 22:13

1 Answers1

12

You already have the answer: Python is the main user of ~/.local. It's the only I remember encountering. In Python, it was adopted as PEP 370.

PEP 370 gives some rationale as to why ~/.local was chosen. Some parts are obvious: it had to be in the user's home directory, since this is for per-user installation. It had to be a dot file so that it's hidden from cursory eyes, just like other configuration files. The name .local mimics /usr/local.

The location had been used by FreeDesktop. I don't know of any application that uses it.