16

I'm new in ubuntu and when I try every time to install a program sometimes I install the program by apt-get command or by snap so, please anyone can tell me when I should use snap or apt-get?
thank you

1 Answers1

22

Both snap and apt are package management systems. Apt was designed to work with Debian distributions, like Ubuntu, while snap is universal and used on various range of Linux distributions. Apt simply installs contents of the package in a location specified in the package description, and software installed in this way may require system or 3rd party libraries, while snaps are self-contained, run in a sandbox and do not communicate directly with the host system.

Also apt is free and is the part of the Debian project, while snap was created commercially.

Piotr G
  • 441
  • so, in this case, if I want to install the program by apt-get I can do that instead of snap even if the command is used by snap depending on the website that writes that command, right? and we can say that apt-get is a general term and stronger than snap to install any package? – abdelhamed abdin Sep 02 '20 at 19:46
  • 3
    Consider a clarification: apt/apt-get works on .deb packages only. snap works on snap packages only. Ubuntu is a conglomeration of many independent upstream projects, including projects that use debs and projects that use snaps. – user535733 Sep 02 '20 at 20:31
  • 1
    @abdelhamedabdin If the program is available as both a .deb package and as a snap package, then you can choose which method of installation you prefer. But bear in mind that you may not be getting the same version of the software, or the same version of the software's dependencies. No, it is not correct to say that apt-get is a "general term and stronger". They are different package managers which each have their own pros and cons. – Jon Bentley Sep 03 '20 at 11:12
  • thanks, @JonBentley for this specific clarification – abdelhamed abdin Sep 03 '20 at 12:20
  • "snap was created commercially" could do with a little clarification see https://github.com/snapcore/ . Many open source projects have commercial backers but this does not necessarily impact the copy right licensing. – wheredidthatnamecomefrom Jul 06 '22 at 15:18