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)...how do I quickly query my system to see where blah.qfx now lives?

  • 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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.