• keen@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    11 hours ago

    Use apt in the shell and use apt-get in scripts, because apt has beautiful shell output but it isn’t script safe

  • pulsewidth@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    17 hours ago

    How my brain distinguishes them:

    apt-get when you want full verbose output

    apt when you want to feel fancy with progress bars and colours

    • mrsingh@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      14 hours ago

      apt install nano (simple, clean)

      apt-get install nano (works too, but more detailed output)

      Apt-get give more technical output , helps in scripting .

  • themeatbridge@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    22 hours ago

    apt is for like when you want to, and apt get is the other way to get the apt. And then if it doesn’t, sudo apt will, or then sudo apt get. Like if you’re just doing an apt, and then you also need to apt get, you can.

  • Matombo@feddit.org
    link
    fedilink
    arrow-up
    56
    ·
    1 day ago

    apt-get has a fixed format machine parseable output

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

  • DonutsRMeh@lemmy.world
    link
    fedilink
    arrow-up
    139
    arrow-down
    1
    ·
    2 days 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.

      • DonutsRMeh@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        1 day ago

        Lol. You’re not alone. I’ve thought that for the longest time ever. Until one I had the question pop into my head and started searching it.

    • Captain Aggravated@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      If I recall correctly, Linux Mint did their own thing for a bit with the apt command so there were two different implementations out there for awhile?

      • DonutsRMeh@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        I don’t know if they modified apt at all. I know they have their mint tools that call apt through some python code, like mintinstall = apt install <package> for the software manager and mintupgrade = apt upgrade for updating mint versions … Etc

  • truthfultemporarily@feddit.org
    link
    fedilink
    arrow-up
    291
    arrow-down
    3
    ·
    2 days 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
  • Barometer3689@feddit.nl
    link
    fedilink
    arrow-up
    16
    ·
    2 days ago

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

    • bluewing@lemm.ee
      link
      fedilink
      arrow-up
      12
      ·
      1 day ago

      I got tennis shoes older than you, (literally a pair of original Converse I bought new back in the 1970s). I was there before the original chains of Unix, DOS, and finally Linux were foraged. I saw OS2 die in battle. And I saw the dark time of when paper and pencils and slide rules vanished from this earth.

      The knowledge of apt-get and apt only matters to those warriors of the Cli when they wield the sword of sudo to vanquish the evils that exist when upgrading. For they do the bidding of the dark wizards of Dev, holders of the command su.

      Now that I have demonstrated my age by showing everyone how senile I am. ‘apt install’ is aimed at users to give a nicer response to it’s use. It need not be backwards compatible either. ‘Apt-get install’ is older and is meant to be usable as a lower level command and to work with other APT based tools.

      What does this mean for you today? Not a damn thing. I still always type: sudo apt-get install when using a deb based dsitro out of sheer habit. But it’s not needed the vast majority of the unwashed masses. So feel free to just type apt install to help prevent carpel finger nail.

        • bluewing@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          10 hours ago

          I can remember using punch card readers to access inventory data, I have used paper punch tape to load CNC programs into machining centers and dragging arouind a reader we had mounted on a 4 wheel garden cart, (I can still remember when the tape reader fell off that cart too). And marveling at getting a 3 1/2" drive installed into a machine to load programs and how much faster and easier that was.

          Gods, I either need a lobotomy or just to die to forget those memories…

        • bluewing@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          10 hours ago

          That’s interesting, I did not know that! Thanks Stranger!

          Now, if you do not remember or know the “Converse. Limousines for the Feet” tagline. Then get of MY lawn yet again. 🤣

          Converse walked so Nike could run with their tagline.

          • ChickenLadyLovesLife@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 hours ago

            I don’t remember that Converse tagline … but back then I was wearing Sears Toughskins instead of Levis, that should make it clear how fashionable I was. “Limousines for the Feet” is a pretty laughable slogan, though, since chucks are about the least comfortable shoes in the history of humanity - even Ötzi’s fucking bird’s nest shoes were probably more comfortable.

            • bluewing@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              9 hours ago

              Taglines are always silly, that’s kind of the point to make you remember. But it sold a LOT of shoes.

    • splendoruranium@infosec.pub
      link
      fedilink
      English
      arrow-up
      11
      ·
      2 days 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
        5
        ·
        1 day 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.

        • hactar42@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          Can confirm, I’m right on the edge of Gen-X and Millennials. I was the only one of my friends who had a computer pretty much all the way through elementary school. And the only reason we had computers in our house was because my dad was a computer engineer. By the time I was in highschool pretty much everyone had at least a family computer.

    • r0ertel@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Ditto. I started my linux journey with Slackware 1.0 that I got in a book. I quickly got tired of dual booting so I picked up a used 486dx66 on Craigslist. It even came with a green on black 12" CRT! I took a class and started hacking on the kernel to learn the innards. I fixed a semaphore issue, improved the task scheduler for performance and constantly rebuilt the kernel for performance (before modularized drivers were a thing). I learned not to panic from a kernel panic.

      Slackware’s “package manager” was a notepad next to the computer. I switched to debian later and loved the whole idea of a package manager. Mostly because it was a trove of free software, but also because it would handle all the dependencies for me and cleanly uninstall (at a time when disk space was valuable).

      Those were the days! Long live apt & apt-get!

  • AA5B@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    1 day ago

    This is one of the reasons I need to set up Linux at home. I use it at work but who knows what the flavor of the week is?

    At this point I can’t tell the difference between yum and rpm and apt and dnf

    • mlg@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      1 day ago

      Edit: realized you meant in the sense of hot swapping flavors after I typed out a whole explanation lol. Should start recommending niche distros and collect package managers like trading cards lol.

      yum = dnf, dnf is just the newer version which was rewritten several times.

      apt is a weird attempt to “upgrade” apt-get with better user interface without messing with the compatibility of apt-get used by scripts and whatnot.

      Both of these are dependency handling package managers which do all the magic of installing required subpackges when you want something.

      rpm is the underlying system package manager which deals with the actual task of installing, removing, and generating packages in the .rpm format. It is analogous to Debian’s dpkg which uses the .deb format. It’s usually not used by the end user unless you need to play with a package directly like with a .rpm or .deb file.

      Hence why some distros (or people) have their own dependency package manager, like zypper on OpenSUSE (rpm) or Aptitude on Debian (deb).

      Although I think Aptitude might just be a fancy wrapper for apt lol.

    • embed_me@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Me too but I am just zen at this point knowing the knowledge is one search away (I don’t even have to read the man)

      • AA5B@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        11 hours ago

        I’ve had better results by including “man” in my searches to find the man pages, but man that makes for some questionable looking searches

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    40
    arrow-down
    2
    ·
    edit-2
    2 days 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.

    • Colloidal@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days 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.

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    2 days ago

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

  • four@lemmy.zip
    link
    fedilink
    English
    arrow-up
    18
    ·
    2 days 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
      30
      ·
      edit-2
      2 days ago

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

        • Rhaedas@fedia.io
          link
          fedilink
          arrow-up
          9
          ·
          2 days 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.