• DonutsRMeh@lemmy.world
    link
    fedilink
    arrow-up
    74
    ·
    5 months 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.

  • keen@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    5 months ago

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

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    5 months ago

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

  • RustyNova@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    5 months ago

    I got mistaken. See replies for explanation

    =======

    Apt: get whatever is in the cached package list

    Apt-get: lookup the package to see the latest version and get that one

    Unless you always apt update, apt-get is the go to choice for modern day Linux

    There’s also the apt-apt command, who triggers any audiophile to start complaining about mainstream music quality these days

  • AA5B@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    5 months 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
      5
      ·
      edit-2
      5 months 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
      ·
      5 months 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
        ·
        5 months 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

  • pulsewidth@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    5 months 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

  • themeatbridge@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    5 months 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.

  • Matriks404@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    Isn’t this explained in the manpages for apt(8) and apt-get(8)?

    Do people don’t read their manuals anymore?

  • truthfultemporarily@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    5 months 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
  • harmsy@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    It’s been a long time since I’ve needed to use either. Instead I typically use Synaptic Package Manager, Mint’s Software Manager, or gdebi. Guess I’m just a filthy casual.