• truthfultemporarily@feddit.org
    link
    fedilink
    arrow-up
    299
    arrow-down
    3
    ·
    1 month ago

    The binary is called apt-get. There are others like apt-cache etc.

    Apt is a script that just figures out which binary to use and passes the arguments on.

    • apt update -> apt-get update
    • apt policy -> apt-cache policy
    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      106
      ·
      1 month ago

      You know, I thought I knew why, but this was new information to me, so I guess I didn’t.

      Thanks for sharing this concise explico!

  • dan@upvote.au
    link
    fedilink
    arrow-up
    246
    ·
    edit-2
    1 month ago

    These days, apt is for humans whereas apt-get is for scripts. apt’s output is designed for humans and may change between releases, whereas apt-get is guaranteed to remain consistent to avoid breaking scripts.

    apt combines several commands together. For example, you can use it to install packages from both repos and local files (e.g. apt install ./foo.deb) whereas apt-get is only for packages from repos and you’d need to use dpkg for local packages.

    • nelson@lemmy.world
      link
      fedilink
      arrow-up
      62
      ·
      1 month ago

      Huh TIL.

      I never considered trying to install a package from a local file through apt, but always dpkg. End result is the same of course. The web suggests dpkg rather than apt as well ( or at least the pages I ended up on ).

      • themoonisacheese@sh.itjust.works
        link
        fedilink
        arrow-up
        29
        ·
        1 month ago

        Discord is distributed as a .Deb if you don’t use flatpak because they can’t be bothered to set up a repo.

        The very useful thing about local file install is that unlike dpkg, apt will install dependencies automatically

        • Fushuan [he/him]@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          1 month ago

          Thats weird, they do have an arch official package and that’s the one they usually don’t make because AUR is a thing. Have you checked lately?

          • bisby@lemmy.world
            link
            fedilink
            English
            arrow-up
            6
            ·
            1 month ago

            An “official” arch package? The arch package is packaged by the arch maintainers. https://gitlab.archlinux.org/archlinux/packaging/packages/discord

            The maintainers of the PKGBUILD are all arch maintainers, which just downloads the generic .tar.gz file discord provides and puts it in all the places you need for you.

            The “official” arch packages are just PKGBUILDs like the AUR, except prebuilt, managed (and signed) by the arch team.

            • Fushuan [he/him]@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              1 month ago

              I didn’t know, thanks! I guess in hindsight I meant “official” as in, it’s not just some rando, I can trust it won’t break, and I don’t have to manually download the stuff every time xD

          • themoonisacheese@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            1 month ago

            I have checked on every new update because their fuckass client apparently can’t update itself in big 2025 and instead just opens your browser to the download url because that’ll convince people that Linux is great.

            • Fushuan [he/him]@lemm.ee
              link
              fedilink
              arrow-up
              3
              ·
              1 month ago

              Updating itself isn’t really the Linux way of things. The Linux way is to have a centralised place like pacman or apt and to download everything at once. Every app having their own download and update system sounds like a nightmare.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        1 month ago

        apt and apt-get both use dpkg internally, but these days it’s essentially seen as an implementation detail that regular users don’t need to know about.

        dpkg doesn’t resolve dependencies (that’s a feature of apt) which means that if you install a Debian package with dpkg, you’ll have to manually install all dependencies first, and they won’t be marked as automatically installed (so autoremove won’t remove them if they’re not needed any more). Using apt solves that.

        The web suggests dpkg because either the articles are old, or they’re based on outdated knowledge :)

        • Successful_Try543@feddit.org
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          1 month ago

          @fluckx@lemmy.world

          dpkg doesn’t resolve dependencies (that’s a feature of apt) which means that if you install a Debian package with dpkg, you’ll have to manually install all dependencies first, and they won’t be marked as automatically installed

          Usually installing a manually downloaded package and its dependencies works like this:
          # dpkg -i package-file.deb
          # apt-get -f install

          So apt-get can be used to install missing dependencies afterwards while marking them as automatically installed.

  • DonutsRMeh@lemmy.world
    link
    fedilink
    arrow-up
    116
    arrow-down
    1
    ·
    1 month ago

    apt is a newer, more user-friendly front-end for apt-get and apt-cache.

    apt = combines commands like install, remove, update, upgrade into one tool, with prettier output

    #apt-get = older, lower-level, more script-friendly For normal use, just use apt now. For scripting where 100% backward compatibility matters, use apt-get.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    47
    arrow-down
    2
    ·
    edit-2
    1 month ago

    apt is newer and mostly supersedes apt-get/apt-cache/etc tools, tries to be a more-approachable frontend.

    They interoperate though, so if you’re happy with using a mix of them, go for it. I generally just use apt.

    EDIT: There were also some older attempts to produce a unified frontend, like aptitude.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      25
      ·
      edit-2
      1 month ago

      mostly supersedes apt-get/apt-cache/etc tools,

      Except for in scripts. Debian guarantee that the output format of apt-get will never change and thus it’s safe to use in scripts that parse the output, whereas they don’t have the same guarantee for apt, which can change between releases.

    • Colloidal@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 month ago

      Aptitude is great (my favorite way of managing packages), but it’s a TUI program. You can use it as CLI, at which point it mimics apt-get.

      So I would say it never attempted to unify apt commands, by rather it successfully provided a user friendly way to do most (all?) of what you could do with apt CLI tools.

  • four@lemmy.zip
    link
    fedilink
    English
    arrow-up
    18
    ·
    1 month ago

    When working with RHEL I always flip a coin to see if I’m gonna use yum or dnf this time

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      29
      ·
      edit-2
      1 month ago

      Here lie dragons. Make sure you understand commands that you run on your computer. 👍

        • Rhaedas@fedia.io
          link
          fedilink
          arrow-up
          8
          ·
          1 month ago

          People don’t change. Some people look at what they’re repeating and try to understand the why, others blindly do what they are told by whom they deem as authority. LLMs are the latest, earlier were various websites (which LLMs were trained on, uh oh), still before that were the computer magazines with things to type in and the later versions even maybe a free CD of stuff. The printed media was less likely to have malicious things in them, but lord did they have errors, and the right error in the wrong place could ruin someone’s day if they just ran it without understanding it.

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    1 month ago

    I came in for the jokes but all I found was helpful responses. Did I get the Nazi virus from Reddit?

  • Matombo@feddit.org
    link
    fedilink
    arrow-up
    11
    ·
    1 month ago

    apt-get has a fixed format machine parseable output

    apts output tries to be more human readable and is subject to change

  • Empricorn@feddit.nl
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 month ago

    I know about these and git and flatpaks and snaps and can definitely explain them all to you! But unfortunately, I just remembered I left my oven on…

  • Barometer3689@feddit.nl
    link
    fedilink
    arrow-up
    8
    ·
    1 month ago

    jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?

    • splendoruranium@infosec.pub
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 month ago

      jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?

      Well… how old were you when you got your first computer? That young.

      • rumba@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        Dicey proposition, some mid and older genX grew up before home computers were commonplace.

        When I was in my tweens, only really affluent people had computers. Schools had one single computer in a classroom or maybe a couple in a lab, and almost no one was computer literate.

        • splendoruranium@infosec.pub
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 month ago

          I meant that in the sense of “At least that young”. Yes naturally the age of first contact gets lower as computers become more commonplace. Then again I think true desktop computers are very much on the downturn once more.