5 ms·
- Where do I put my binaries ? in /usr/bin of course - But it's kinda personal stuff... so put it in /usr/local/bin - Oh right, but now I have more stuff th
by jvehent 13y ago
- Where do I put my binaries ?
in /usr/bin of course
- But it's kinda personal stuff...
so put it in /usr/local/bin
- Oh right, but now I have more stuff that's not really important but still useful
that's what we have /opt for
- but... what if it's optional and only on my machine
oh hell, just create /opt/local/bin and be done with it already!
- jjindev 13y agowasn't /usr the original /home? as I understand it, it grew and became a system directory. with /bin as the original bin.
- yebyen 13y agoOn FreeBSD, /home is actually a symlink to /usr/home
- claudius 13y agoBut even /opt/local/bin (a construct I’ve never seen…) is just one letter longer than ‘Program Files’ – so at least they got the "not too long" bit right.
- mintplant 13y ago`Program Files` would actually be `C:\Program Files` (or the equivalent) if you're going for an absolute path. So `/opt/local/bin` comes out to two letters shorter.
- claudius 13y agoHence ‘even’, saying that even the full path is only one letter longer than the single directory name. :) Though, really, I have never seen /opt/local/bin – /usr/bin for package-manager owned stuff, /usr/local/bin for stuff not owned by the package manager and /opt/<Vendor> for weird things…
- gnaritas 13y ago/opt/local/bin contains no spaces and thus doesn't require quoting or escaping and is thus more than two shorter in actual use.
- ch0wn 13y agoYou missed `/bin/`, `/sbin/`, `/usr/bin/`, `/usr/sbin/` and the same in `/usr/local`. Luckily there are some efforts to clean this up: https://fedoraproject.org/wiki/Features/UsrMove https://fedoraproject.org/wiki/Features/UsrMove
- pavanky 13y agoAs opposed to windows where the user binaries are not located in a central location, I'd take this any day of the week. You can't blame *nix for having too much choice. Especially when it's coherent.
- TylerE 13y agoI actually find unix worse here, as I rarely care about where the binary is (and `which` will happily tell me on the rare occasions that I do), but I often need to find various supporting files. Are they in /usr/share? /usr/local/share? /opt/fooprog? (in the olden days /usr/X11R6/share, or many other variants).
- codeflo 13y agoThere are efforts to fix this. In Arch Linux, all binaries are now in /usr/bin, and /bin is just a symlink to /usr/bin.
- TylerE 13y agoThat's not my problem. My problem is: Where is the template file for xyz, or the doc, or the example config, or ...
- pavanky 13y agoWhat are the equivalent locations for windows ? Also almost all programs installed via the package manager will use the same paths. If you are installing a package manually, then things get more.. interesting.
- junto 13y agoahhhhh, so /usr/bin isn't the recycle bin...