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 mean not just the binary, but its libraries, config files and data (strictly speaking all files). Also when I download a package where is it best to extract it. If I move these files will the app be corrupted?

share|improve this question
On non-mobile OSes, "app"s are called either programs or applications. I personally hate that word already.. – Bora May 16 '11 at 20:19
That was a really good question btw, Tichomir. – Blomkvist May 16 '11 at 20:22
@Bora: "app" is just shortened form of "application", and was in use way before the smartphone craze. – grawity May 16 '11 at 22:05
@grawity: I'd like to see your source, primarily to deepen my hate in its history. – Bora May 17 '11 at 6:10
up vote 17 down vote accepted
  • Most programs follow the Filesystem Hierarchy Standard (man hier): libraries go to /usr/lib, configuration files to /etc, static data to /usr/share, and so on.

    Some self-contained programs put all data in /opt/<program>/.

  • .deb/.rpm packages are not supposed to be unpacked manually – they should be handled by the apropriate program, dpkg or rpm.

    If you have only the source code in a tarball, you must extract it to a temporary location (somewhere to /tmp or $HOME). The rest, including installation is usually handled by the Makefile (by running make install); see FHS above.

share|improve this answer
Note that FHS version 3 is currently in progress, and the layout may change somewhat. – grawity May 16 '11 at 20:18
And indeed, once you have used the .deb or .rpm file, it is no longer needed. If I download a random .deb file, I usually download it to /tmp, or my home directory if I may need it again on a different box. When apt downloads a package, it is stored in /var/cache/apt from where it will eventually be cleaned out. – tripleee Aug 16 '12 at 3:52

The Filesystem Hierarchy Standard describes the directory layout used on Linux.

share|improve this answer

You must log in to answer this question.

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