Hacker News new | ask | show | jobs
by teamhappy 3699 days ago
/{bin,sbin} is for stuff you cannot live without (e.g., sh, mkdir, chmod, rm, ln, etc.)

/usr/{bin,sbin} is for stuff you can live without but expect to be there (e.g., make, grep, less).

/usr/local/{bin,sbin} is for stuff you/your local admin installed (e.g., mosh, cmake).

Also, I use $HOME/{bin,sbin} for wrapper scripts, binaries that I need but don't want to install system-wide (single-file C utils that come without man pages, stuff like that).

I'm not sure where the confusion comes from and I don't really see any advantage in merging / and /usr. On the flip side, I do think there's value in keeping /{bin,sbin} as small as possible (because that stuff has to work).

2 comments

Regarding your last sentence, why does having grep in /bin reduce the chance of mkdir working?
I doesn't reduce the chance of mkdir working but it does increase the chance of you missing a bug in the part of your source tree that needs to be rock solid.
Did you read the link?
Yup. I'm not sure what you're hinting at though. Are you saying that's not really why they exist? True, but that's how people use them.