Using APT on the Command Line

FAIL (the browser should render some flash content, not this).

How to use apt-get from the command line.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Shawn, Can you share .ogg

martin3z's picture

Hi Shawn,

Can you share .ogg / .ogv file of this video, please?

Thanks.

About apt-get or aptitude

Juan Valencia's picture

In some cases, first you have to export your proxy with the next command
export http_proxy=pr.o.x.y:port
and now you can upgrade, update or install your packages.

About APT o Aptitude, when you're trying to install some packages and APT can`t find, Aptitude recommend you a similar package you're trying to install.

yum

Anonymous's picture

How about a yum tutorial for those of us in an rhn world?

It's on my list.

Shawn Powers's picture

It's on my list, along with YAST (which I've actually never used either!) Stay tuned!

Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter

Use aptitude instead

Chris Lambacher's picture

apt-get, apt-cache and friends are the old tools. You should be using aptitude instead.
aptitude update
aptitude upgrade
aptitude search x
aptitude install x

With aptitude you only need to remember one command and it does a better job of tracking dependencies for later uninstall:
aptitude remove x

See http://pthree.org/2007/08/12/aptitude-vs-apt-get/

Just My Preference

Shawn Powers's picture

aptitude (while often touted as the preferred method) is a great tool, no doubt. And while aptitude can be configured to automatically install suggested and recommended packages, I don't think it does a better job of tracking orphaned dependencies anymore. (I could be wrong, but I think the autoremove option will get rid of orphans now)

I prefer apt-get, largely out of familiarity. I don't think one is better than the other, and APT is such a great package management system, it's hard to go wrong no matter which front end you use!

Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter

apt-get is more widely available

Dai's picture

aptitude may be nice, but if you are using APT-RPM on a Red Hat box or Fink on MacOS X, aptitude is not available.

apt-get is available on systems using either APT-RPM or Fink and works beautifully.

Free Dummies Books
Continuous Engineering

Learn:

  • What continuous engineering is
  • How to continuously improve complex product designs
  • How to anticipate and respond to markets and clients
  • How to get the most out of your engineering resources

Get your free book now

Sponsored by IBM

Free Dummies Books
Service Virtualization

Learn to:

  • Define service virtualization
  • Select the most beneficial services to virtualize
  • Improve your traditional approach to testing
  • Deliver higher-quality software faster

Get your free book now

Sponsored by IBM