16

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?

4
  • 7
    On non-mobile OSes, "app"s are called either programs or applications. I personally hate that word already..
    – Bora
    May 16, 2011 at 20:19
  • 1
    That was a really good question btw, Tichomir.
    – Blomkvist
    May 16, 2011 at 20:22
  • 3
    @Bora: "app" is just shortened form of "application", and was in use way before the smartphone craze. May 16, 2011 at 22:05
  • 1
    @grawity: I'd like to see your source, primarily to deepen my hate in its history.
    – Bora
    May 17, 2011 at 6:10

2 Answers 2

20
  • 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.

2
  • 2
    Note that FHS version 3 is currently in progress, and the layout may change somewhat. May 16, 2011 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, 2012 at 3:52
3

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

You must log in to answer this question.

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