LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2013, 11:22 AM   #1
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Rep: Reputation: Disabled
Difference between apt and apt-get


Hi everyone,
I'd like to know why there is the 'apt-get' and 'apt' command. They seem to do the exact same things, however 'man apt' tells me that 'apt-get' has a few more features.
Why are there two versions of apt?

Thank you!
 
Old 08-19-2013, 11:59 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I don't think there is an apt command. There's certainly none on my system except for the one used by java. So the simple answer is that there are not two versions of apt. On the command line use aptitude or apt-get for managing packages.
jdk (not java)
 
Old 08-19-2013, 11:59 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830
APT is not a command itself, but it is a package management system. Several package managers can use this package management system, for example apt-get, aptitude, Synaptic or the Software Center. It just appears that the authors of apt-get have implemented more command-line options than the authors of aptitude (which in opposition to apt-get comes with an interactive user-interface) or Synaptic (which is designed for graphical usage).
So in general, there is only one version of APT, but it is used by different frontends, each with a different approach and therefore catering to different users. I personally just use apt-get because I am used to it, I also could run aptitude (it does even understand the same command-line options), just use what you prefer.
 
Old 08-19-2013, 12:23 PM   #4
climaxnix
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian GNU/Linux
Posts: 12

Rep: Reputation: 2
when i first started using linux, with the habbit of a windows user, i like to use Synaptics. But afterwards i felt more comfartable with tools like apt-cache [search|show], dpkg and apt-get.

One of the reason is that i try to keep track of my system modifications. for example if i install a new package i took outputs of some of the commands mentioned above and put them in a log file that i create.

So i think all is about preferences and being comfartable.
 
Old 08-19-2013, 12:28 PM   #5
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Original Poster
Rep: Reputation: Disabled
@jdkaye Maybe it's because of your distro, I do have this command though.
@TobiSGD Ah, so apt-get is dependent on apt. I thought apt-get was apt itself and not a frontend for it. Thanks!
@climaxnix I use the command line for the same reason. It unsettled me when I found out about the two commands, I wanted to know the tools I'm using.

Last edited by dermetfan; 08-19-2013 at 12:40 PM.
 
Old 08-19-2013, 01:23 PM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by dermetfan View Post
@jdkaye Maybe it's because of your distro, I do have this command though.
My distro is Debian, which is what I thought you were using.
Out of curiosity, can you post the path to the "apt" command. Do you happen to know what package contains the "apt" command?
I did find an executable called "apt" in /etc/cron.daily/. Maybe that's what you mean. It's not really meant to be used from the command line however.
jdk
 
Old 08-19-2013, 02:36 PM   #7
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Original Poster
Rep: Reputation: Disabled
That's weird because mine is based on Debian. The path is /usr/local/bin/apt. Unfortunately I don't know the package and apt-file returned way too much.
 
Old 08-19-2013, 03:02 PM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by dermetfan View Post
That's weird because mine is based on Debian. The path is /usr/local/bin/apt. Unfortunately I don't know the package and apt-file returned way too much.
Aha! /usr/local/bin is the typical location of things you have compiled from source yourself. Perhaps the source code lacked the "-get" after the "apt" when creating the executable. In any event that is not the typical location for such system executables. You generally find them in /usr/bin, /usr/sbin, /bin, or /sbin.
jdk
 
Old 08-19-2013, 03:33 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830
Quote:
Originally Posted by dermetfan View Post
Unfortunately I don't know the package and apt-file returned way too much.
If you give apt-file the exact path it should only come up with packages really containing that binary.
 
Old 08-19-2013, 03:39 PM   #10
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jdkaye View Post
Aha! /usr/local/bin is the typical location of things you have compiled from source yourself.
Well I'm pretty sure I didn't compile anything from source yet at all because I just installed this system like three days ago. Also apt doesn't seem like something you'd manually install after the installation, it's too important.
I guess it's like TobiSGD said, apt-get is a frontend for apt.
The description from 'man apt' seems to agree with that:
Quote:
Originally Posted by man
APT is a management system for software packages. For normal day to day
package management there are several frontends available, such as apti‐
tude(8) for the command line or synaptic(8) for the X Window System.
Some options are only implemented in apt-get(8) though.
It's weird apt is in /usr/local/bin/apt and apt-get in /usr/bin/apt-get then though.

Last edited by dermetfan; 08-19-2013 at 03:44 PM.
 
Old 08-19-2013, 03:42 PM   #11
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
If you give apt-file the exact path it should only come up with packages really containing that binary.
'apt-file find /usr/local/bin/apt'
gives me nothing.

EDIT: Wait a moment, didn't update...
EDIT2: Takes longer to search, but still returns nothing.

Last edited by dermetfan; 08-19-2013 at 03:49 PM.
 
Old 08-19-2013, 04:29 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830
When I say that apt-get (and others) is a frontend for APT (the Advanced Packaging Tool) that doesn't mean that there exists a program apt somewhere that is used by apt-get. APT is more of a protocol that is used by different programs through the libapt-pkg library. On a normal Debian system there is no program called apt, especially not in /usr/local, which shouldn't be used by Debian packages at all. May it be that you have installed a custom package from a third party source?
 
Old 08-19-2013, 04:53 PM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,156

Rep: Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661
I just had a play in a VM with a live DVD of Ubuntu 13.04 Beta (the most recent I have) and it doesn't have an executable called apt but on the Linux Mint 13 live DVD (again, the latest I have) there is, indeed, an executable /usr/bin/apt that is a wrapper script in Python for apt-get. It belongs to the mintsystem package, apparently.
 
2 members found this post helpful.
Old 08-19-2013, 05:23 PM   #14
dermetfan
LQ Newbie
 
Registered: Aug 2013
Distribution: NixOS
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
I just had a play in a VM with a live DVD of Ubuntu 13.04 Beta (the most recent I have) and it doesn't have an executable called apt but on the Linux Mint 13 live DVD (again, the latest I have) there is, indeed, an executable /usr/bin/apt that is a wrapper script in Python for apt-get. It belongs to the mintsystem package, apparently.
Thanks! This seems to be the solution. I tried what happened if I uninstalled it and it seems to match with what you found out.

Quote:
Originally Posted by apt-get remove apt -s

The following packages will be REMOVED:
apt aptdaemon apturl ddm mint-meta-debian-core mintwelcome python-aptdaemon
python-aptdaemon.gtk3widgets python-software-properties
software-properties-gtk unattended-upgrades wajig
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
[...]
 
Old 08-19-2013, 05:25 PM   #15
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,156

Rep: Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661Reputation: 1661
Thanks for posing the question -- I like to find out these little differences in the distributions.
 
  


Reply

Tags
apt, apt-get


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Difference between apt-get and aptitude circus78 Debian 4 05-18-2013 09:19 AM
apt pinning /etc/apt/apt.conf parent's_basement Debian 5 10-26-2008 06:50 PM
What is the difference between dpkg and aptitude/apt-get? Akhran Debian 13 03-14-2006 12:33 AM
What is the difference between APT and Portage (Gentoo)? Akhran Debian 2 03-01-2006 01:04 PM
What's the difference between apt-get upgrade and apt-get dist-upgrade? davidas Linux - Newbie 4 04-04-2004 09:19 PM


All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration