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
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
sudo in Windows.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
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.
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!
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.
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 ).
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
Same with Zoom.
And here I am using gdebi for those kinds of local packages...
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 :)
apt-get has a fixed format machine parseable output
apts output tries to be more human readable and is subject to change
Me use apt. Why use many letter when few letter do trick?
Hahahaha Kevin
Me laughing in pacman
"Hello, I would like to -Syu a package." "Can I -Rsc this?"
Statements dreamed up by the utterly deranged
Wait until you learn of aptitude...
aptitude has been my go-to since at least woody or potato.
One of the lines of all time.
Pfff I know all about the aptitude, who do you think I am? Someone who doesn't know the aptitude? I use it all the time for a lot of ... stuff the aptitude does
Isn't this explained in the manpages for apt(8) and apt-get(8)?
Do people don't read their manuals anymore?
π΅
APT, APT, APT, APT
Just meet me at the...
π΅
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.
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.
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.
Nala gang rise up!
I'll just copy whatever is in the guide I'm following at the time.
Here lie dragons. Make sure you understand commands that you run on your computer. π
When working with RHEL I always flip a coin to see if I'm gonna use yum or dnf this time
Wasn't yum just mapped to dnf a while back?
What is dnf anyway? I see that used on later RH-based distros instead of yum.
#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.
But apt-get also has install, remove, update and upgrade...
Yes, but apt-get is missing search for instance, because that relates to the cache, so apt-cache provides it.
apt combines all those often used commands, and provides a nicer shell presentation.
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
I disagree. According to Debian's own documentation, apt is a newer front-end for your daily CLI updating and installing needs.
It has simplified syntax, and combines the most-used functions and options.
It is not meant for use in scripts, cause the syntax may change between versions.
The dependency-solver in the back-end is identical.
tl/dr:
apt is shorter to type and will have prettier output, starting with Debian 13.
Use apt-get inside scripts.
jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?
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.