apt-get

Apt-Get

The apt-get command is a powerful command-line tool used to work with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.

Install a Package: Installation of packages using the apt-get tool is quite simple.

  • sudo apt-get install nmap

Remove a Package: Removal of a package or packages is also a straightforward and simple process.

  • sudo apt-get remove nmap
 

 

Multiple Packages: You may specify multiple packages to be installed or removed, separated by spaces.

Also, adding the --purge options to apt-get remove will remove the package configuration files as well.

Update the Package Index: The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file and in the /etc/apt/sources.list.d directory. To update the local package index with the latest changes made in repositories, type the following:

  • sudo apt-get update

Upgrade Packages: Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updates).

  • sudo apt-get upgrade

For information on upgrading to a new Ubuntu release see the section called “Upgrading”.

Actions of the apt-get command, such as installation and removal of packages, are logged in the /var/log/dpkg.log log file.

For further information about the use of APT, read the comprehensive Debian APT User Manual or type:

apt-get help

 

posted @ 2012-03-15 15:47  nalasun  阅读(216)  评论(0编辑  收藏  举报