• gigachad@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    18 hours ago

    As someone who is confused when he has to deal with a .deb file and always has to google what to do with it - what is the advantage of a .deb over let’s say a shell script?

    • wolfinthewoods@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 hours ago

      It might be different for other distros, but for me on MX Linux, I just click on the .deb and it opens a shell with a root prompt and installs the file automatically. Easy peasy.

    • cley_faye@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      15 hours ago

      If made correctly (which is hilariously easy), it’s a clean install and uninstall process, support some level of potential conflict regarding files that are shared with other packages/commands, support dependencies out of the box, and with minimal work can be made easy to update for the user (even automatically updates, depending on the user’s choices) by having an (again, very easy to setup for a dev) repository. With the added value of authenticity checks before updating.

      All this in a standardized way that requires no tinkering, compatibility stuff, etc, because all these checks are built-in.

      Note that some of this probably applies to other system package management solutions, it’s not exclusive to .deb.

    • 👍Maximum Derek👍@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      17 hours ago

      I never fully trust a shell script and usually end up reading any I have to use first, so I know what they do. And after so many years dpkg holds no mysteries for me and Discover will install .debs if I double click while in KDE.

      • everett@lemmy.ml
        link
        fedilink
        arrow-up
        9
        ·
        17 hours ago

        It’s worth knowing that .deb files can contain setup scripts that get run as root when installed, so you should trust them too.

        • 👍Maximum Derek👍@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          6
          ·
          edit-2
          5 hours ago

          Yeah. They all come with risks, but I psychologically struggle to run shell scripts unless I know what’s in them. And the same brain dysfunction makes my automatically distrust a script that doesn’t set pipefail.

          • everett@lemmy.ml
            link
            fedilink
            arrow-up
            4
            ·
            16 hours ago

            That definitely makes sense. Also, the scripts in a .deb should be incredibly short and readable, if you choose to check them out.

    • Monstrosity@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      16 hours ago

      dpkg -i <nameofpackage.deb>

      Which can be read as: (Debpackage) -install <nameofpackage.deb>

      That’s it!

      Also, if you haven’t already, install tldr (apt install tldr), then you can ‘tldr deb’ (or any other command) to get a few examples of their most used functions.