apt and apt-get

Colin Law clanlaw at gmail.com
Fri Aug 9 10:25:59 UTC 2019


On Fri, 9 Aug 2019 at 11:11, Colin Watson <cjwatson at ubuntu.com> wrote:
>
> On Fri, Aug 09, 2019 at 05:14:33PM +0800, Eliza wrote:
> > I am running ubuntu-18.04, which has both apt and apt-get for package
> > management.
> >
> > $ apt-get -v
> > apt 1.6.10 (amd64)
> >
> > $ apt -v
> > apt 1.6.10 (amd64)
> >
> > Are these two programs the same one? which is suggested?
>
> "man apt" says:
>
>        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).
>
> Both of these programs are relatively simple frontends over the same
> library code, so it's safe to use either one, but "apt" has better
> defaults and if you're new to the system you should start with that.

In addition apt simplifies things combining other commands.  For
example previously apt-cache could be used in this way
apt-cache policy <package>
now one can do
apt policy <package>

Colin
>
> --
> Colin Watson                                       [cjwatson at ubuntu.com]
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list