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

0

1 Answer 1

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.

5
  • 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? Sep 2, 2020 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 2, 2020 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. Sep 3, 2020 at 11:12
  • thanks, @JonBentley for this specific clarification Sep 3, 2020 at 12:20
  • "snap was created commercially" could do with a little clarification see github.com/snapcore . Many open source projects have commercial backers but this does not necessarily impact the copy right licensing. Jul 6, 2022 at 15:18

Not the answer you're looking for? Browse other questions tagged .