Score:1

What is the difference between `$HOME/bin` and `$HOME/.local/bin` ? When to use use one over the other?

cl flag

According to this post, $HOME/.local/bin is used to store user-specific binaries. But I see in this post that $HOME/bin serves a similar purpose.

What am I missing? When should I use one over the other?

I know about the difference between /usr/bin and /usr/local/bin. Is it the same here?

I also know about hidden directories and files.

Both work : I'm looking for a rule or a convention to help me choose one or the other.

Thank you in advance.

Pilot6 avatar
cn flag
It's up to you where to store your binaries. You can create any directory you like. It doesn't matter.
Score:0
cn flag

The main difference is that $HOME/.local/bin is a hidden directory.

It doesn't matter where you store your binaries. You can store them e.g. in $HOME/binaries.

It won't change anything.

Pilot6 avatar
cn flag
You can always add anything you like to $PATH.
Pilot6 avatar
cn flag
And also `$HOME/bin` isn't added by default.
Haltarys avatar
cl flag
Thank you for your answer. I know about hidden directories and how adding a directory to `PATH` works. I was really only just looking for an explanation for a convention, what is the most UNIX/Linux-like way of doing things or if it's a unique quirk from Ubuntu.
Pilot6 avatar
cn flag
If you add a directory to $PATH, you won't need to type the full path when run something. There is no "convention" for that. It is like "where do I store my photos".
Haltarys avatar
cl flag
But `/usr/bin` and `/usr/local/bin` are both in `$PATH` but you're not supposed to add the same type of binary in them. `/usr/bin` contains system executables managed by the package manager, while `/usr/local/bin` contains "manually" installed executables. Both work, but it's good practice to differentiate them.
Pilot6 avatar
cn flag
It doesn't matter what "type" of binary is in the $PATH. The only reason to add something there is to run binaries without entering a full path.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.