Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

tl;dr: by putting them in the home directory

Everyone does this; it's pretty standard. Using XDG directories (~/.local/bin) is most common nowadays, but hey, you do you.

It does annoy me that cargo has its own bin directory in ~/.cargo, but I'm too lazy to set the env vars to move it.



I use the `~/.local/bin` methodology for single binaries, too. Linux, macOS, doesn't matter. I try hard to not make my home directory look like a phonebook when I `ls -alh` it. Sometimes that's easier said than done. I also use `~/.local/opt` as a container for larger applications (like Emacs). While I don't have architecture distinctions, I also don't use multiple versions or platforms regularly.


I actually prefer ~/.cargo/bin because it's clear from the path where I installed it. I only put executables I wrote or I compiled into ~/.local/bin. All language-specific package managers have a dedicated directory. The system package package naturally installs to /usr/bin.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: