I. Introduction of apt

I. Introduction of apt

apt stands for Advanced Packaging Tool is an installation package management tool for Linux systems.
First need to install the software in a Linux system, you need to compile all kinds of software on their own, the lack of a unified management tool package. After that it occurs when the Debian system, dpkg management tools will be designed, and thereafter for faster and more convenient to install various types of software, dpkg front end to APT also appeared. In Ubuntu16.04 apt command system has been enhanced features to make it more convenient and popular.

Two, apt Command Introduction

(一)apt update

All software updates the list of software sources. Because the update database operation requires administrator privileges, so before the command sudo apt to add commands to obtain permission.


 
apt update command execution results

Run apt update command will return three states: one hit, one acquisition, one is ignored.
Hit information indicating the connection on the site, the package has not changed.
Gets the updates and download.
Ignore means no need to update the update or the update does not matter.
In order to display the last, you will be prompted to how many packages may be upgraded, or you can upgrade later according to their immediate needs.

(B) apt list

apt list --upgradeable: display packages can be upgraded.


 
apt list upgrade implementation of the results

apt list --installed: show installed packages.

(三)apt upgrade

After you perform the update command, you can use apt upgrade to upgrade packages. After executing the command system will prompt a few software needs to be upgraded. After obtaining your consent, the system begins to automatically download and install the package.


 
apt upgrade implementation of the results

(D) apt install <package name>

Install the specified software. This command needs administrator privileges. If you are not very clear on the name, you can enter the name of the part of the software, the system will prompt similar names package name. Setup requires the use of the old version sudo apt-get install <软件包名>, the new version now has an alternative proposal directly using apt apt-get command.
sudo apt install -f
Use this command to fix the dependency, because if there are software dependencies are not satisfied and can not be installed, you can run this command to automatically repair the installation package depends on the package. In particular occurs when using the dpkg command to install deb package dependency problems often need this command to repair.

(E) apt remove <package name> and apt autoremove

apt remove <package name> is used to specify the uninstall software.
apt autoremove for automatic cleaning and dependent libraries are no longer in use.


 
apt autoremove implementation of the results

(Vi) apt show <package name>

Displays package details. For example: the version number, the size of the installation, dependencies, bug reports, and more.


 
apt show command execution results


Author: zhengjie
link: https: //www.jianshu.com/p/e6f436f785ed
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Guess you like

Origin www.cnblogs.com/xuanbjut/p/12536019.html