Apt-Get
The apt-get command works with Ubuntu's Advanced Packaging Tool (APT) to help install and
upgrade packages. You can add packages to your sources list (/etc/apt/sources.list).
Command
Description
Sudo apt-get install packagename
To install a package you simply use the command to the left.
You can add multiple packages in a single command, just
put a space between each of the package names.
Sudo apt-get remove packagename To remove a package, you just replace the word 'install' with
'remove'. You can add multiple packages in a single
command, just put a space between each of the package
names.
Sudo apt-get update
A package index is a list of available packages, as defined in
your /etc/apt/sources.list file.
To update this, you can just type the command to the left.
Sudo apt-get upgrade
After you've updated your package index (as above), you
can update all of the out of date packages on your system.
Whenever you run an apt-get command, it makes a l og of what you did. This can be found under
/var/log/dpkg.log.
Aptitude
Install, remove and upgrade commands can be carried out with single-key commands through a
menu driven interface (making life a little bit simpler for those of us that dislike the terminal).
To open aptitude just type 'sudo aptitude' into the terminal. You can exit aptitude by typing 'q' into
the terminal.
Command
Description
Install a package
You can locate the package you want to install via the 'not
installed packages' menu (by using keyboard arrows).
When you hit enter, the package line will turn green (this
means it has been marked for installation.
If you press the 'g' button, you'll receive a summary of the
actions you're about to take (i.e. the install). By pressing 'g'
one more time, you'll kick off the install.
Remove a package
You can locate the package you want to remove via the
'installed packages' menu (by using keyboard arrows).
www.netshock.co.uk