this post was submitted on 27 May 2024
17 points (90.5% liked)

Linux

48331 readers
397 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

sometimes, if I want to install a program from the terminal, I get 2 options: apt and snap.

It can happen that the displayed versions are not the same, one candidate shows a higher version number than the other.

Do both libraries use the same numbering system and is it safe to assume that the higher the version number is, the newer the program is and one should only consider this variable to install new stuff?

all 6 comments
sorted by: hot top controversial new old
[–] rotopenguin@infosec.pub 8 points 6 months ago* (last edited 6 months ago)

Snaps (and flatpaks) have a much better way of handling DLL hell than good ol deb/rpm/pacman. As such, each app is better able to chase the latest version of all of its dependencies, without worrying about messing up the libraries for anyone else.

Snap/flatpak also sandbox their apps, reducing the blast radius of exploited or bad apps.

My personal preference is to use flatpak, and set it up so that it is all --user. With a --user install, you don't need sudo to update anything. Use Flatseal to tighten up or loosen the sandbox, use Warehouse to roll back any broken updates. I don't think snap has any tools like Flatseal or Warehouse, which makes it the weaker packager.

Anything that can be installed as a flatpak, I do it there first. Then I can just pick up my home directory, drop it in a different distro, and almost all of my stuff follows. A distro becomes little more than "a kernel, a compositor, a baseline desktop environment, and some background daemons".

[–] IsoKiero@sopuli.xyz 6 points 6 months ago

They both use upstream version number (as in the number software developer gave to the release). They might additionally have some kind of revision number related to packaging or some patch number, but as a rule of thumb, yes, the bigger number is the most recent. If you should use that as a only variable on deciding which to install is however another discussion. Sometimes dpkg/apt version is preferred over snap regardless of version differences, for example to save a bit of disk space, but that depends on a ton of different things.

[–] redcalcium@lemmy.institute 3 points 6 months ago (1 children)

Generally yes, but keep in mind that apt packages are maintained by canonical, while snap packages could be maintained by canonical, the apps' original developers themselves (e.g. Firefox snap is maintained by Mozilla), or a 3rd party unrelated to canonical or the app's developer (i.e. random dudes packaging apps into snap and submit them). If the snap packages are not maintained by canonical, there is nothing stopping the snap packagers to use a different versioning scheme, though it's unlikely. In general, it's a good idea to check the package entry on snapcraft.io to figure out who packaged them so you can decide if it's trustworthy or not.

[–] kionite231@lemmy.ca 2 points 6 months ago

wow, your profile gif is awesome :D