apt-get or apt?

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
SpidermansLegs
Posts: 42
Joined: Sat Nov 11, 2023 5:03 am

apt-get or apt?

#1 Post by SpidermansLegs »

Can I ask a silly question?

What is the difference between apt and apt-get?

I have always used apt-get in the past, does apt on it's own work?

Code: Select all

sudo apt-get update
for instance.. is what I use to update.

User avatar
gimcrack
Posts: 305
Joined: Fri Dec 02, 2011 5:17 pm

Re: apt-get or apt?

#2 Post by gimcrack »

Key differences: apt vs. apt-get

The difference between apt and apt-get is not just that apt is a newer version of apt-get. The apt command was designed as a more user-friendly alternative to apt-get, combining the functionality of multiple package management tools for user convenience.

https://aws.amazon.com/compare/the-diff ... d-apt-get/

User avatar
Adrian
Developer
Posts: 9199
Joined: Wed Jul 12, 2006 1:42 am

Re: apt-get or apt?

#3 Post by Adrian »

Use apt in terminal, use apt-get in scripts.

Charlie Brown

Re: apt-get or apt?

#4 Post by Charlie Brown »

Very nice link that explains it well.

If this was what confused you: Yes, you can do it with apt-get, as you're used to:

Code: Select all

sudo apt-get update ; sudo apt-get install linssid -y
:)

Also, as mentioned in that page apt has some advantages, say, rather than apt-cache blah blah you can simply:

Code: Select all

apt show linssid

Or... as mentioned, it's compatible, i.e. I always do this and suggest frequently on forum:

Code: Select all

sudo apt update ; sudo apt dist-upgrade -y
actually (technically / by syntax) it's wrong, cause it should be either:

... apt-get dist-upgrade

or

... apt full-upgrade

But it's already linked to full-upgrade and apt knows what you mean :)

User avatar
SpidermansLegs
Posts: 42
Joined: Sat Nov 11, 2023 5:03 am

Re: apt-get or apt?

#5 Post by SpidermansLegs »

Thank you for explaining :)

I'm just so used to typing apt-get, I don't think I can get used to apt :) :)

Charlie Brown

Re: apt-get or apt?

#6 Post by Charlie Brown »

Ok.. I guess you're also used to &&

rather than ;

ok... no problem, you can use whichever you like :)

User avatar
Adrian
Developer
Posts: 9199
Joined: Wed Jul 12, 2006 1:42 am

Re: apt-get or apt?

#7 Post by Adrian »

Or use "nala upgrade" which does both in one shot.

User avatar
asqwerth
Developer
Posts: 8038
Joined: Sun May 27, 2007 5:37 am

Re: apt-get or apt?

#8 Post by asqwerth »

Is apt-get now just a shortcut to apt, in Debian Stable?
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
Jerry3904
Administrator
Posts: 23499
Joined: Wed Jul 19, 2006 6:13 am

Re: apt-get or apt?

#9 Post by Jerry3904 »

Charlie Brown wrote: Mon Nov 13, 2023 5:58 pm Ok.. I guess you're also used to &&

rather than ;

ok... no problem, you can use whichever you like :)
I have the same muscle memory effect...
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Adrian
Developer
Posts: 9199
Joined: Wed Jul 12, 2006 1:42 am

Re: apt-get or apt?

#10 Post by Adrian »

asqwerth wrote: Mon Nov 13, 2023 7:59 pm Is apt-get now just a shortcut to apt, in Debian Stable?
No, it's not.
apt provides a high-level commandline interface for the package management system. It is intended as an end
user interface and enables some options better suited for interactive usage by default compared to more
specialized APT tools like apt-get(8) and apt-cache(8).

Post Reply

Return to “MX Help”