0

what i mean is those installer files that can also contain a pre and postinstall script. So not talking about regular package managers. I tried searching on google but I couldn't find it. Sorry if i am being an idiot. I heard something about appimages, is that the same or not? personally I am looking to switch to arch from macos but i like the installers.

  • Ah well okay but that is not what i am looking for. I was looking for a file that installs its contents and stuff without running commands – martijnt500 May 12 '21 at 11:38
  • Ah well I guess that my question is a little useless then. Those pkg files are clearly not needed. – martijnt500 May 12 '21 at 11:41
  • I wouldn’t say it’s useless, you didn’t know the answer which is fine. I wasn’t sure about what you were looking for exactly, otherwise I’d have written a proper answer instead of comments; I can still do that if you want. You might find Is there .sh installer (software archive is append to .sh flat text file) generating tools for unix? interesting too. – Stephen Kitt May 12 '21 at 11:44
  • Do you know what a .pkg file is? – martijnt500 May 12 '21 at 12:06
  • Maybe that helps for a proper answer? – martijnt500 May 12 '21 at 12:06
  • It is a file on macos that is an installer. it automatically executes the pre and post install scripts and it prompts for administrator password if needed. – martijnt500 May 12 '21 at 12:08
  • I was particularly interested in the code signing ability. All other good things are in packet managers too. – martijnt500 May 12 '21 at 12:39
  • The "philosophy" of software installation in Linux vs Mac/Windows is just different. In Mac/Windows you download executable installers which you find by yourself, and run them. They do everything needed to install the software on their own. In Linux, you usually use common system-wide mechanisms to install packages from repositories (so you don't have to find and download anything yourself), but you can also install manually downloaded .rpm or .deb packages (depending on Linux variant) using the same mechanisms. I prefer Linux approach as it gives consistency among all software. – raj May 12 '21 at 12:57

1 Answers1

4

In most cases, the recommended way to install applications on Linux distributions is to go through the package manager; this brings a number of benefits, including the ability to install any required dependencies, the availability of security updates, and the authentication of packages (see How is the authenticity of Debian packages guaranteed? for Debian; many other distributions have similar setups). Such packages can include pre- and post-installation scripts if necessary.

Installing applications from the package manager doesn’t have to involve commands; many desktop environments integrate the package manager into their “software catalogs”. GNOME for example has its Software application (which also integrates Flatpak, see below).

However it is possible to install applications in a manner similar to what you’re used to on macOS with .pkg files. In many desktop environments nowadays, double-clicking on a package file will install it, prompting for administrative authorisation as necessary. In many environments this skips the authentication side of packages though, but packages installed in this manner will also be upgradeable if upgrades are available in the system’s configured repositories.

It is also possible to create .pkg-style installers for Linux, e.g. using MojoSetup (see Making Download & Install Style Programs for Linux). Programs can also be packaged using Flatpak or similar tools; in Flatpak’s case, the result will typically be a .flatpakref file which can be installed by double-clicking too (this is how installation from Flathub works).

AppImage files are slightly different; they are self-contained applications in a single file that don’t require installation. All that’s needed is to download them, and then double-clicking on them will run the packaged program, without any installation step (and thus no need for administrative access).

Stephen Kitt
  • 434,908
  • Thank you for the answer. I will look into the different approaches you have given. (BTW how to mark an answer as the correct one?)

    EDIT: I found the check mark.

    – martijnt500 May 12 '21 at 18:08