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

ok. I asked this question earlier(as part of another question) and got no response - so here it is again:

what i the recommened directory for me to store the following:

1). my apps 2). development tools (C++ tools) 3). AMP applications for LAMP stack (Apache, MySQL, PHP) 4). files for websites that I develop on my machine - e.g. website1, website2 etc ...

share|improve this question
  1. Let your package manager handle it. (Your other question mentions you are using Ubuntu 9. Your package manager is Add/Remove programs in Ubuntu 9.04 or Software Center on 9.10. If you prefer the command line, you have a choice of apt-get or aptitude.) Most go in /usr/bin.
  2. See above. Although, gcc and g++ are preinstalled on a lot of distros.
  3. See 1.
  4. /var/www
share|improve this answer
Thanks macha, very useful feedback – morpheous Nov 2 '09 at 8:35

For the most part, if your distribution uses a sane package manager, whatever it defaults to is probably where it's supposed to go. For the most part, applications get thrown in the /usr heirarchy, with binaries in /usr/bin, libraries in /usr/lib, documentation in /usr/doc, and so on. Configuration files like to show up in /etc, regardless of where their applications are installed. Proprietary packages have a tendency to hide in /opt just to make things interesting.

A quick rundown on your specifics:

  1. Apps tend to be installed in /usr/bin, /usr/local/bin, or in some cases /opt. If you're developing your own software, or custom modifying an existing package, /usr/local/bin is probably your best choice. Otherwise, use your package manager's default.
  2. Development tools should be treated the same as any other applications. See 1.
  3. Again, AMP applications should be treated the same as any other applications. See 1.
  4. /var/www is the most common, but /srv/www seems to be gaining momentum. Depending on your system, the two may be symlinked together anyway. You should probably use whichever one Apache defaults to for consistency. User-specific webpages would go in ~/public_html regardless.

Check out the Filesystem Hierarchy Standard if you want further details and rationale thereof.

share|improve this answer
thanks for the link – morpheous Nov 2 '09 at 9:18

You must log in to answer this question.