Debian is one of the earliest Linux releases. It can attract public attention because it makes it very easy to install and uninstall software. When other releases are stuck in the dependency quarary, Debian users are immune from these problems because of a better package management system. All Debian-based distributions use this package management system. The Deb package can package the files of an application together, basically like the installation files on Windows.
The first step to use apt-get is to introduce the necessary software libraries. The Debian software libraries are the collection of all Debian software packages, which exist on some public websites on the Internet. Add their addresses to Apt-get to search for the software we want.. /Etc/APT/sources. ListIs the configuration file that stores these address lists. Its format is as follows:
Deb [web or FTP address] [release name] [main/contrib/non-free]
For example, Ubuntu is a Debian-based release, and its sources. List can be like this:
Deb http://in.archive.ubuntu.com/ubuntu breezy main restrcted
You can add your own address. The apt-get.org has some nice address lists. After setting the address, you must synchronize the software library on the local machine with the online library (only the software description information, excluding the software itself ). In this way, a list of available software is available on the local machine. The command is as follows:
Apt-Get update
After running successfully, you can find the software in your release. The command is apt-cache, and the command is retrieved on the local machine instead of connected to the Internet. For example:
# Apt-cache search baseutils
This command can be used to list the situation of the baseutils software package, such as whether it is available or not.
Just download the software, do not understand the package and install the-D option, such:
# Apt-get-D install package_name
Use the -- dry-run option to enable apt-get to be tested before installing the software package, for example:
# Apt-Get install package_name -- dry-run
The name of the Debian software package is different from that of the software package. If you do not know the software package name before installation, go to the official Debian software library at http://www.debian.org/distrib/packages /. Or use the apt-cache search package_name command described below to query.
Apt-Get remove package_name1 package_name2 package_name3...
Delete a software package. If you want to delete useless software packages, you only need to use this command. If you want to delete the configuration file of the software, you can use the -- purge option, for example:
Apt-Get -- purge remove package_name
Apt-Get source package_name1 package_name2 package_name3
Download the source code version of the software package.
Apt-Get upgrade package_name1 package_name2 package_name3...
The software package upgrade function is the main reason for the success of the apt system. With this command, we can upgrade the software to the latest version. Before using this command, run the apt-Get update command to update the software package database. However, this solution is not the best way to update the system. Some packages will be retained (kept back) some old software packages due to the package dependency problem. Debian provides a better upgrade solution, namely dis-upgrade. The following section describes in detail.
Apt-Get dist-Upgrade
Update the entire Debian system. The entire system can be updated from the network or local. It will reschedule the dependency of the package. If some packages cannot be updated for some reason, run the following command to query the cause:
# Apt-get-O Debug: pkgproblemresolver = Yes dist-Upgrade
Apt-Get clean
Delete the downloaded software package. When we install the software package through apt-get,APT downloads the software package to the local/var/Cache/APT/archives/directory.. This command will delete all software packages except lock in the folder.
Apt-Get autoclean
Delete a software package of the old version that has been downloaded. This command is similar to the above command, but it will delete the old version of the software package.
Apt-Get dselect-Upgrade
Update the system using the "Suggestions" and "Recommendations" functions of dselect. Dselect is a powerful package management tool in Debian. It helps you select a software package for installation. One of the useful features is that it recommends and recommends installing other related software packages. We can use this function in apt.
Apt-Get check
Check the dependencies of installed software packages in the system.
See http://man.chinaunix.net/linux/debian/debian_learning/ch03.html;
Http://www.chinaitpower.com/2006Aug/2007-12-04/236745.html