This answer explains .msi and setup.exe files for installing an application on Windows.

Are there equivalents to .msi and to setup.exe files in Debian or Ubuntu? Do .deb package files correspond to .msi or setup.exe or something else?

  • 8
    I don't know why you're asking this, so I'll say this as a general comment for anyone who comes across this question. While there are ways to install software "manually", the way preferred by most Linux distributions (and strongly recommended) is to install software through the package manager. This way you automatically get security updates and there's some level of testing done to ensure compatibility with the distribution. If you need the latest and greatest version of software not available in main repos, use a community repo (eg a PPA in Ubuntu), but always use the package manager. – Muzer Apr 25 '17 at 9:37
  • There are no .setup files on Windows, do you mean setup.exe which is a typical name for an installer? – gronostaj Apr 25 '17 at 9:44
  • See the apt-get man page and the docs linked from there. There is no equivalent on Windows even for apt-get install, let alone essentially any of the other things it can do. – jthill Apr 25 '17 at 12:12
  • 5
    @jthill, that's untrue. It's not as fully-fleshed or as popular as apt-get, but recent (Win7 and up) versions of Powershell have OneGet through which you can install Chocolatey (an equivalent to Homebrew on Mac). They might be less popular than their 'nix equivalents, but to say that there is no equivalent on Windows is blatantly incorrect. – flith Apr 25 '17 at 13:00
  • 1
    @Tim: this question cannot be answered sensibly without you specifying what precisely you mean by "equivalent". What specific properties of .msi files and installers are you interested in? What are the precise criteria to determine whether something is "equivalent" or not? For example: installers are just programs like any other program. There is absolutely nothing special about a program named setup.exe. Since setup.exe is just a program like any other program, and Debian most certainly does have a concept of "program", do you consider that equivalent? If not, why not? – Jörg W Mittag Apr 25 '17 at 14:09

Probably closer to an MSI installer than a setup.exe, a .deb package includes a tree of files to copy into the filesystem, as well as a collection of pre- and post-installation hooks to run (among other things). The hooks can effectively do anything on the system, including something I don't think I've ever seen on Windows: adding users for a system service. One thing they can't do is install another .deb package — the database is locked during installation, so this can only be achieved through dependencies. Installing a .deb package then produces entries in a central database of installed packages for ease of maintenance.

The ttf-mscorefonts package is interesting in that the package itself contains only a script to download and install the fonts. This script is executed in one of these hooks.

Closer to setup.exe might be downloading a progam's source code from the project's homepage, then running ./configure && make && sudo make install, or whatever other method the authors decided to use. Since this method does not add the package to the database of installed programs, removing it later can be much more difficult.

Another difference is that a .deb specifies its dependencies, so proper installation can be guaranteed. As far as I know, in the Windows world an MSI cannot cause the installation of another MSI, so setup.exe is typically used for this kind of dependency tracking. Several comments note that MSIs can name dependencies, but since there is no central database of MSIs like there is for .deb packages, missing a dependency will just cause a failure to install.

Thus, a .deb is sort of in between an MSI installer and a setup.exe. The package can do whatever it wants during its pre- and post-installation hooks, can name and usually find its own dependencies, and leaves a record of its installation in a central location for ease of maintenance.

| improve this answer | |
  • 2
    In Windows, setup.exe-style installers also integrate into the tracked installer system (with uninstallers etc.). With both MSI and .exe installers, dependencies are handled by embedding the dependency in the installer (e.g. the VC redistributable installer or the DirectX installer) and by installing dependency DLLs alongside the executable (or as system assemblies). So setup.exe is also similar to .deb. The equivalent to building from source is building from source on Windows too ;-). – Stephen Kitt Apr 25 '17 at 7:35
  • I do not one thing that makes MSIs closer to Debian packages than setup executables: an MSI can’t install another MSI, just like a Debian package can’t install another package (except via its dependencies). – Stephen Kitt Apr 25 '17 at 7:57
  • @StephenKitt: setup.exe-style installers are in no way "tracked" by the OS unless they run MSIs underneath (and then the MSIs are the ones tracked). The fact that they have an uninstall registry key has no bearing on this. That's like saying every file is tracked because it's listed in the file system. – user541686 Apr 25 '17 at 7:57
  • 2
    MSI can and often (in bigger products) do have dependencies, though, given that there's no central repository of .MSI, usually what happens when you miss a dependency is that they refuse to install. – Matteo Italia Apr 25 '17 at 11:36
  • 1
    "something I don't think I've ever seen on Windows: adding users for a system service". I'm fairly certain that the SQL Server, IIS and Visual Studio installers do this. But it might be less obvious as the Windows users model is a bit more refined that the default Unix/Linux model (either you're root or you're not).. – MSalters Apr 26 '17 at 8:25

Single-file binary installers I have seen on Linux were .sh files which contained a shell script concatenated with a binary blob, like this:

tmpdir=$(mktemp -d /tmp/installer.XXX)
tail -n +6 "$0" | tar -xJf - -C "$tmpdir" || exit 1
sudo "$tmpdir/setup.sh"
rm -rf "$tmpdir"
[binary content follows]

This is essentially equivalent to a setup.exe which also self-extracts to a temp folder and runs the real installer from there.

| improve this answer | |

Taken from: https://askubuntu.com/questions/13415/what-are-run-files/13416#13416

A .run file is normally a custom made program which needs to be executed in order to install a program. these are not supported generally as they don't track where files go and don't normally provide an uninstall method. there is no way to be sure what the script will do to your system so they're considered unsafe.

They are close to the windows exe file and as such come with the same issues.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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