Frequently Asked Question
What is /opt and when should I install software there?
/opt is reserved by the FHS for self-contained third-party software packages that do
not follow the distribution's normal layout. A vendor product called Acme would install
everything (binaries, libraries, configuration, documentation) under /opt/acme/, with
its own internal bin/, lib/, and etc/ subdirectories. Uninstalling is then a matter
of deleting one directory, with no scattered files left behind. Common examples on real
systems are /opt/google/chrome, /opt/spotify, /opt/dropbox, and Oracle products.
/opt is appropriate when the software is a closed-source or out-of-tree application
that doesn't fit the FHS, when you want a clean isolation boundary, or when you're
bundling things for an organisation that needs to be sure nothing has been altered under
/usr. For software you compile yourself from source, the more conventional choice is
/usr/local (which uses the same bin/lib/share split as /usr itself); for software
installed by the package manager, the choice has already been made for you and it lives
under /usr.