Posting for a friend lol
Posting for a friend lol
Posting for a friend lol
Me use apt. Why use many letter when few letter do trick?
Use apt in the shell and use apt-get in scripts, because apt has beautiful shell output but it isn't script safe
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
apt install nano (simple, clean)
apt-get install nano (works too, but more detailed output)
Apt-get give more technical output , helps in scripting .
Me, I'm old, so I just keep using apt-get
, because that's all we had back in the day, and I never bothered to learn what's the big deal about apt
. It's just a frontend, isn't it?
Apt looks a little prettier I think. But I may be wrong.
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.
apt-get has a fixed format machine parseable output
apts output tries to be more human readable and is subject to change
WARNING: Aptitude does not have a stable CLI interface.
aptitude is yet another dpkg wrapper
#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.
TIL apt isn't literally the same thing as apt-get
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.
I didn’t even realize I thought this, but reading your comment I definitely did.
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?
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
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
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 :)
jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?
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.
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.
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.
Nah a lot of people now think screen time is bad without evidence. Never would be allowed to get on a computer at 3-4.
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!
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
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.
Thanks
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)
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
🎵
APT, APT, APT, APT
Just meet me at the...
🎵
Uh-huh uh-huh...
Following this post for replies, for a friend of course
You may want to tell your friend to check it now!
Friends says thanks, friend !
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.
They interoperate though, so if you're happy with using a mix of them, go for it.
Same goes for nala
, BTW.
One has super cow powers, the other one doesn't.
apt | cowsay
But unfortunately, apt moo | cowsay
does something horrible to the cow in the speech bubble.
I came in for the jokes but all I found was helpful responses. Did I get the Nazi virus from Reddit?
Wait until you learn of aptitude...
Dpkg
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
aptitude has been my go-to since at least woody or potato.
One of the lines of all time.
@randamumaki@lemmy.blahaj.zone @cm0002 Oh, hey, I found myself on here.
Nala gang rise up!
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...
Console chiding me every time I use apt-get out of habit because it’s deprecated now…
I use them one after another just to be sure I'm up-to-date.
Pretty sure it's basicaly
alias apt='apt-get'
Isn't this explained in the manpages for apt(8) and apt-get(8)?
Do people don't read their manuals anymore?
Anymore? Where do you think RTFM comes from, people never read the manual.
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
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.
Uh!? I've been lied to! Editing comment for clarity
I can concur, thats what my research also indicates. Plus I am too lazy to type apt-get
My personal experience is that apt-get will absolutely miss packages that apt will capture.
I was actually surprised by that about six months ago and finally switched over to apt after years of apt-get.
Alias is your friend.
alias install="sudo apt update && sudo apt install -y"
install git
I'd recommend avoiding aliases that conflict with regular commands, and there's a standard Linux command called install
. https://man7.org/linux/man-pages/man1/install.1.html
If you're going to always pass the -y flag then I'd add --no-install-recommends too.