Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Linux (Ubuntu) and the FHS standard is a little confusing. Also, because its a standard and not a strictly-enforced system, I see many applications installing files to the various FHS directories in inconsistent ways.

My first question: is there a way to force a package to install software under, say, just the /opt directory? That way I could install all of my software nicely underneath /opt. My motivation behind this is that I usually cannot find where a binary or any of its resources were installed to, even after reading through the documentation (and browsing the "Installed Packages" list in Synaptic).

My second question: if the 1st question isn't possible (all apps rooted at /opt), then how does the average Linux guru tell where a particular file got installed to. Say I install MySql workbench, which has some blah.qfx resource (like an ODBC driver or something) do I quickly query my system to see where blah.qfx now lives?

share|improve this question
If I am on an unfamiliar Unix/Linux variant i run man hier. This will print a document telling me how files are organized. man pages generally specify where the significant files can be found. – BillThor Jan 5 '12 at 0:08
up vote 0 down vote accepted

You can always install to a different directory, but this isn't always advisable imho. Some packages don't like being installed in other locations.

apt-get install something --path=/opt/or-somewhere

as far as locating what is where... a large portion of that is using the locate command which is part of the slocate package iirc. updatedb to build a database of where files are (which is usually run regularly as a cron job) and locate something to actually find it. If you're simply looking for where an executable is hiding... just use which to give you the exact path it's running from.

As far as what is commonly put where... most flavors of linux have their own mind on this subject. Wikipedia has a good article on this subject... that is a good place to start.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .