Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
7  
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
1  
That was a really good question btw, Tichomir. –  Blomkvist May 16 '11 at 20:22
2  
@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
add comment

2 Answers 2

up vote 16 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
1  
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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