Page 1 of 1

Can you install Linux apps merely by copying directories?

Posted: Thu 04 Oct 2012, 20:13
by benali72
Back when I used to support Unix (AIX and HP/UX), we sometimes would install a program on a new system merely by copying its directory (and all subdirectories) from a system it was already installed on, over to the target system.

Can you do that with Linux?

Are there any limitations/concerns I should be aware of?

Thank you.

Re: Can you install Linux apps merely by copying directories?

Posted: Thu 04 Oct 2012, 20:59
by TheAsterisk!
benali72 wrote:Back when I used to support Unix (AIX and HP/UX), we sometimes would install a program on a new system merely by copying its directory (and all subdirectories) from a system it was already installed on, over to the target system.

Can you do that with Linux?

Are there any limitations/concerns I should be aware of?

Thank you.
Assuming both systems are running the same Linux version, then- basically- very often yes, but not quite always.

Beyond that simple answer, the files for a Linux application aren't always arranged so neatly into a single directory, but might be spread out through the file tree a bit.

This is basically how simple packages work in Linux, though. The difference is that a compressed archive is unpacked and then its contents are dropped into place throughout the file tree rather than a simple directory copy. (More complex packages may execute some commands or a script on installation, but it's not a requirement, necessarily.)

To see what I mean about the packages, you can grab a dot-pet package, rename the *.pet extension to *.tar.gz, and extract it. Poke around a few of them for a bit, and you'll see what I mean.

Beyond that, you may need to update a few things by hand after the fact- MIME-types come to mind, as do menu entries, etc.- but a simple copy works a lot of the time.

TL;DR -- Sometimes it does work, sometimes it doesn't. Give it a try, test it a bit, and mind the bumps in the road.


(On a somewhat related note, simple copying of dependencies (the odd library, an empty but searched-for settings file, etc.) from an old installation of Ubuntu 8.04 was how I got some very critical programs (like my dial-up client) running smoothly on Puppy 412.)

Posted: Fri 05 Oct 2012, 16:38
by benali72
Hey, thanks, @TheAsterisk!. That was just what I needed to know. I'll start poking around and learn more. Thanks.

Posted: Fri 05 Oct 2012, 21:02
by Flash
You'd have to tell the boot loader program what files to load and where they are.

Posted: Fri 05 Oct 2012, 23:18
by starhawk
Flash: doesn't that only apply to SFS files, not "okay I'm going to open up this PET package [or whatever, as long as it's an archive of sorts] and put files where they go"?

IIRC a PET package is a modified TGZ (*.tar.gz aka "tarball") so a "manual install" as it's usually called is quite possible. Don't know about SFS -- you'd have to unpack it, and they usually do so into /opt so I'm not sure how exactly it'd work out. Probably just fine but you never know.

Posted: Sat 06 Oct 2012, 02:32
by Flash
Oh my, I completely misread the topic. I somehow got it into my head that benali asked about installing Puppy, not apps in Puppy. :oops:

Never mind.

Posted: Sat 06 Oct 2012, 03:23
by starhawk
No worries :)