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?
-
7On non-mobile OSes, "app"s are called either programs or applications. I personally hate that word already..– BoraCommented May 16, 2011 at 20:19
-
1That was a really good question btw, Tichomir.– BlomkvistCommented May 16, 2011 at 20:22
-
3@Bora: "app" is just shortened form of "application", and was in use way before the smartphone craze.– grawity_u1686Commented May 16, 2011 at 22:05
-
1@grawity: I'd like to see your source, primarily to deepen my hate in its history.– BoraCommented May 17, 2011 at 6:10
2 Answers
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
orrpm
.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 runningmake install
); see FHS above.
-
2Note that FHS version 3 is currently in progress, and the layout may change somewhat. Commented 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. Whenapt
downloads a package, it is stored in/var/cache/apt
from where it will eventually be cleaned out.– tripleeeCommented Aug 16, 2012 at 3:52 -
I ran "whereis git" and got "/usr/bin/git". However, I cannot find the said directory. Most git files seem to be right there in "/usr/bin". I had installed git using "dnf install git-all." Commented Jun 22 at 11:10
-
-
1@DhawalPatil: Git doesn't have a function to install packages. In general, though, if you're installing anything not through the OS package manager, then it's best to keep it confined to a separate directory (makes it easier to uninstall such things later) and avoid locations that the package manager might use (to avoid file conflicts). The usual suggestion is /usr/local, but if I'm installing something that involves a lot of files, then I might go with /usr/heimdal for Heimdal, /usr/samba for Samba, etc. – easier to remove the whole directory than pick out the pieces from /usr/local/foo. Commented Jun 26 at 12:13