Skip to main content

Timeline for answer to What is the difference between /opt and /usr/local? by pepoluan

Current License: CC BY-SA 3.0

Post Revisions

10 events
when toggle format what by license comment
Oct 17, 2019 at 5:22 comment added Didier A. FHS 3 says: "The directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for local system administrator use. Packages may provide "front-end" files intended to be placed in (by linking or copying) these reserved directories by the local system administrator, but must function normally in the absence of these reserved directories." So while I agree, /opt should not be on the path, and symlinks should be made in /usr/local/, it now seems that /opt/bin, /opt/man et al. are also meant to serve that purpose. So adding /opt/bin to the PATH would make sense.
Nov 2, 2017 at 4:02 comment added LawrenceC Years later, I now understand why it is not.
Nov 1, 2017 at 22:23 comment added Pacerier @LawrenceC, Why would it be? Doesn't that sort of defeat the purpose of opt?
Apr 18, 2011 at 14:45 comment added pepoluan @ultrasawblade no, it is not. and never should be. after all, according to FHS, /opt must be subdivided into subdirs bearing the name of the package. cramming everything into PATH is a surefire way to disaster. rather, apps should install themselves under /opt, and symlinks their user-invoked programs into /usr/local/bin (or sbin).
Apr 18, 2011 at 14:42 comment added pepoluan @Sean indeed. but sometimes lots of crud gets sent there, too. I'd rather have the cruds not littering my /usr/local
Apr 18, 2011 at 14:41 comment added pepoluan @Let_Me_Be the benefit would be that it's very easy to keep older versions. Let's say I have 2 versions of 'foo', located in /opt/foo-1.1 and /opt/foo-1.2. When I upgrade, foo symlink in /usr/local/bin points to foo-1.2. If for some reason I need to rollback, I just replace the symlink with one that points to foo-1.1 instead. If 1.2 is okay after several weeks, a quick rm -rf /opt/foo-1.1 removes the older version quickly and cleanly.
Apr 18, 2011 at 14:13 comment added LawrenceC Is /opt a standard directory included in $PATH? I know /usr/local is.
Apr 18, 2011 at 11:45 comment added Sean C. Just to comment on the make install target pushing files into /usr/local; this functionality is easily changeable by passing a --prefix= command line parameter to the ./configure script, or if there is no ./configure script, you can pass a parameter to the make target like so: make --prefix=/usr install.
Apr 18, 2011 at 9:54 comment added Šimon Tóth What would be the point? If you are going to make the symlink anyway, why not just put the original file there in the first place?
Apr 18, 2011 at 8:43 history answered pepoluan CC BY-SA 3.0