News for hackers. Stuff that matters.
Re:I'm “still afraid to use spaces in file names” years old by woodruffw on Thursday November 11, 2021 @12:20PM (#29190466)
Is your account the only account that's expected to run the binary? If so, then `$HOME/bin` is a perfectly acceptable (albeit not standard) place to put it.

If you expect other users to be able to execute the program, then you should put it in either `/usr/bin` or `/usr/local/bin`, depending on whether the former is already being used by a package manager. `/opt` is generally for self-contained software that doesn't play nicely with the rest of the system, but might still be installable through the default package manager.

Re:I'm “still afraid to use spaces in file names” years old by megous on Thursday November 11, 2021 @01:05PM (#29190985)
$HOME/.local is the equivalent if /usr/local for per-user stuff.
Re:I'm “still afraid to use spaces in file names” years old by mananaysiempre on Thursday November 11, 2021 @04:35PM (#29193501)
I don’t think there’s any “official” word on that (the XDG spec that defines ~/.local/share doesn’t mention ~/.local/{bin,lib} IIRC, and the traditional per-user entry in PATH seems to be ~/bin), but a fair number of people use it this way, yes, including me.
Re:I'm “still afraid to use spaces in file names” years old by tom_ on Thursday November 11, 2021 @01:07PM (#29190997)
I started out using $HOME/bin, but a fair amount of stuff assumes a /usr- or /usr/local-style folder structure when doing make install, so I've settled on using $HOME/usr/bin instead, so that programs can create $HOME/usr/include and $HOME/usr/share and whatever, without trampling on stuff in my home folder.

Can't remember the last time I had a problem arranging this. If using autotools, which covers 95+% of stuff, it's usually a question of something like "./configure --prefix=$HOME/usr".

(If I want to share stuff between users, /usr/local/ is of course a better place. macOS is a bit more restrictive, so I have a separate user for this, whose /usr folder is readable by everybody.)

Re:I'm “still afraid to use spaces in file names” years old by matheusmoreira on Thursday November 11, 2021 @05:46PM (#29194246)
> $HOME/bin

On freedesktop systems there's the ~/.local directory which is supposed to be a mirror of the file system hierarchy. Seems like a good place for bin, lib, include directories.

Re:I'm “still afraid to use spaces in file names” years old by woodruffw on Thursday November 11, 2021 @01:23PM (#29191170)
Yeah, it definitely gets hairier when using anything that's more than just a drop-in binary.