Linux Apt-get

Source: Internet
Author: User
Tags root access

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

Apt-get commands typically require root access, so follow the sudo command

Cases

sudo apt-get install VSFTPD (FTP installation)

Apt command usageapt-get UpdateIn modifying /etc/apt/sources.list or/etc/apt/preferencesThen run the command. In addition, you need to run this command regularly to ensure that your package list is up-to-date. Apt-get Install PackageName installs a new package (see the Aptitude) Apt-getRemovePackageName Uninstalling an installed package (keep the configuration document)

Apt-get--purge Remove PackageName Uninstall an installed package (delete configuration document) Dpkg--force-all--purge PackageName Some software is difficult to uninstall, but also prevents the application of other software, You can use this, but it's a little risky. Apt-get AutoClean Apt will back up the installed or unloaded software on the hard drive, so if space is needed, you can allow this command to delete the software you have deleted apt-get Clean this command will remove the backup of the installation software, but this will not affect the use of the software. Apt-get Upgrade update any installed package Apt-get Dist-upgrade Upgrade the system to the new version Apt-cache search string searches the package list for strings

Dpkg-l Package-name-pattern lists any packages that match the pattern. If you do not know the full name of the package, you can use "*package-name-pattern*". Aptitude Detailed view of installed or available packages. Similar to Apt-get, aptitude can be called by command-line mode, but only for certain commands-the most common are installation and uninstallation commands. Because

Aptitude more information than apt-get, and can say that he is more suitable for installation and uninstallation.

Apt-cache showpkg PKG Displays package information.

Apt-cache Dumpavail Print the list of available packages. Apt-cache Show PKG displays package records, similar to Dpkg–print-avail. Apt-cache Pkgname the name of any package in the Print package list. Dpkg-s file This document belongs to which installed package.

The DPKG-L package lists any documents in the packages.

Apt-file search filename finds packages that contain specific documents (not necessarily installed) that contain the specified string in the document name. The Apt-file is a separate package. You must first install him using the Apt-get installation and then run Apt-file update. If apt-file search filename outputs too much content, you can try using Apt-file search FileName | grep-w filename (the name of the document that displays only the specified string as the complete word) or a similar method, for example: Apt-file search FileName | Grep/bin/(it is helpful to show only documents that are located in folders such as/bin or/usr/bin, if you are looking for a specific executable document).

* Apt-get AutoClean Run this command periodically to clear the. Deb documentation for those packages that have been uninstalled. In this way, you can free up a lot of disk space. If your needs are urgent, you can use apt-get clean to free up more space. This command will remove the. Deb document that has the software package installed. In most cases you will not be able to use these. Debs documentation, so if you are overwhelmed by the lack of disk space, this approach may be worth a try the original quote: http://blog.sina.com.cn/s/blog_a74cb14b0101krh3.html

Linux Apt-get

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.