Ubuntu system apt command usage summary

  

apt is the abbreviation of Advanced Packaging Tool, is an installation package management tool. So how do you use the apt command to manage the installation package? What are the parameters of the apt command? The following small series will give you a detailed introduction to the usage of the apt command in Ubuntu.

1 apt introduction

Advanced Packaging Tool (Advanced Packaging Tools) release of Debian and its derivatives (such as: ubuntu) package manager. APT can automatically download, configure, and install packages in binary or source code format.

The apt-get command generally requires root privileges to execute, so it is usually followed by the sudo command.

Matches with /etc/apt/sources.list.

2 apt common command set

apt-cache search packagename search package

apt-cache show packagename Get information about the package, such as description, size, version, etc.

apt-get install packagename install package

apt-get install packagename --reinstall reinstall package

apt-get -f install fix install”-f = –fix -missing”

apt-get remove packagename Delete package

apt-get remove packagename --purge Delete package, including deleting configuration files, etc.

apt-get update Update source

apt-get upgrade Updating installed packages

apt-get dist-upgrade Upgrading systems

apt-get clean Cleaning up useless packages

apt -get autoclean Clean up useless packages

apt-get check Check for corrupted dependencies

apt-get dselect-upgrade Use dselect to upgrade

apt-cache depends packagename Use dependencies

apt-cache rdepends packagename is to view the package Which package dependencies

apt-get build-dep packagename Install the relevant build environment

apt-get source packagename Download the source code of the package

The above is the apt command in Ubuntu The usage of the apt command can be used to install, delete, clean up, etc., similar to the software management tools in Windows.

Copyright © Windows knowledge All Rights Reserved