What is the difference between creating .deb files and installing them and just running a .run file?
Debian packages contain the files that belong to the package as well as a “control file” which describes the package's dependencies and other meta-information, and installation scripts that are executed when the package is installed, upgraded or uninstalled.
You can look at the content of a
In general a .deb file is similar to a zip file, that contains files along with short scripts that can run post installation to add users, groups, etc. to the system after installation.
A .run file is usually either a single binary executable or a shell script that contains a binary blob that can be installed. If it's the shell script variety it will often times contain a binary blob that is often synonymous to a recursive zip file or tar file. In other words it will contain directory structures of files.
Other times this type of .run file will simply contain .deb or .rpm files which will get dumped out to the disk, and can either be installed individually, or the script that contained them, will dump them out to disk, and then attempt to install them using your system's package manager software.
An example of this would be if you download the Java JDK from Oracle. It's typically a single executable file that when executed will dump the .deb or .rpm files out to disk, and then install them using
Here's an example of what the download/installation would look like with one of these .run files. The extension is .bin, but this is simply cosmetic, the extension is of really no relevance other than to help users distinguish between the different types of files.
Here the above file will dump out packages for the various components that make up the JDK, after which you can install either all of them or just the ones that you need.
Do it this way allows for additional things to be done beyond just installing a package. For example Oracle has a license agreement that they want you to accept:
With this above installer you can see that it contains just a binary blob of directories of files:
In this case this type of installation is meant to not summon the package manager but simply to dump the contents out to a single directory tree so that you can move it around where ever you desire.
In production environments it's often the case that you don't want to use the package manager, but rather have more control over deployments. Perhaps you have several applications that you're deploying and they each require a different version of the JDK. Using this method you can have them all coexist more easily then say via the package manager.