Guidelines for using Linux command apt

Source: Internet
Author: User
Keywords Linux how to use APT
Tags aliyun apt cache deb package debian display example file

Apt is a Linux command for the Deb package-managed operating system that is used to automatically search, install, upgrade, uninstall software or operating system from the Internet's software warehouse.

The apt command typically requires root permission execution, so the sudo command is generally followed

Example: sudo apt xxxx

The following is a detailed guide to the use of apt, for your reference

Apt Install

&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; Download and all dependent packages, while installing or upgrading the package. If a package is set to a hold (stop sign, it will be put aside.) (That is, it will not be upgraded). See below for more hold details.

Apt Remove [--purge]

Remove and any other parcels dependent on the parcel.
--purge indicates that the parcel should be completely cleared (purged), please see dpkg-p for more information.

APT Update

Upgrade the list of packages from the Debian mirror, and if you want to install any software for the day, run it at least once a day, and each time you modify the
After/etc/apt/sources.list, must be performed.

APT upgrade [-u]

Upgrade so the package that has been installed is the latest available version. No new or removed old packages will be installed. If a package changes dependency and needs to install a new package, it will not be upgraded, but it is marked as
Hold. Apt update does not upgrade the parcel marked hold (this is the meaning of hold). See below how to manually set the package to
Hold I suggest using the '-u ' option at the same time, because you can see which packages will be upgraded.

Apt Dist-upgrade [-u]

Similar to apt upgrade, the Dist-upgrade will install and remove parcels to satisfy dependency relationships.

Apt-cache Search

Search for packages and descriptions to meet.

Apt-cache Show

The full description of the display.

Apt-cache showpkg

Shows a lot of detail, as well as relationships with other parcels.
Dselect
Console-apt
Aptitude
Gnome-apt
APT Several graphical front ends (some of which must be installed before use). Here Dselect is undoubtedly the most powerful, is also the oldest, the most difficult to master.

Common Dpkg Usage
Dpkg-i
Install a Debian package file, as you manually download the file.
Dpkg-c
The contents listed.
Dpkg-i
Extract parcel information from it.
Dpkg-r
Remove an installed package.
Dpkg-p
Completely clears an installed package. Unlike remove, remove deletes data and executables only, purge also removes all configuration files.
Dpkg-l
Lists all the files that are installed. Also see Dpkg-c to check the contents of a. deb file.
Dpkg-s
Displays information about the packages that have been installed. Also, see Apt-cache display package information in the Debian archive, and dpkg-i to display from a
Package information extracted from the. deb file.

Dpkg-reconfigure

Reconfigure an already installed package if it uses debconf (debconf provides a uniform configuration interface for package installation). You can reconfigure
Debconf it itself, such as you want to change its front end or ask for priority. For example, to reconfigure debconf, use a dialog front-end, and simply run:
Dpkg-reconfigure--frontend=dialog debconf (if you choose the wrong installation, this can be changed back yo

echo "Hold" | Dpkg--set-selections

Set Status to Hlod (command-line)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.