Hacker News new | ask | show | jobs
by lupire 139 days ago
What's the difference between opt and local?

I thought was for mixin externally provided systems like Homebrew, local is for machine or org-level customizations, and ~ is for user-level customizations.

1 comments

/opt showed up as a place for packaged software, where each package (directory) has its own bin/, lib/, man/, and so on, to keep it self-contained rather than installing its files in the main hierarchy. ~/opt is just a per-user equivalent, analogous to /usr/local vs ~/.local.

The advantage of /opt is that multi-file software stays together. The disadvantage is that PATHs get long.