Linux apt-get, linuxapt-get

Source: Internet
Author: User

Linux apt-get, linuxapt-get
What is apt-getapt-get? A linux Command is applicable to deb package-managed operating systems, it is mainly used to search, install, upgrade, and uninstall software or operating systems from software warehouses on the Internet.

The apt-get command generally requires the root permission for execution, so it is generally followed by The sudo command

Example

Sudo apt-get install vsftpd (install ftp)

Apt command usage apt-get update is being modified /Etc/apt/sources. list or/etc/apt/preferencesThen run the command. In addition, you need to regularly run this command to ensure that your package list is up-to-date. Apt-get install packagename install a new software package (see the following Aptitude) Apt-get remove packagename uninstall an installed software 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 hard to uninstall, it also stops other software applications and can be used, but it is a little risky. Apt-get autoclean apt will back up installed or unloaded software on the hard disk, so if space is required, this command can delete the software you have deleted. apt-get clean will also delete the backup of the installed software, but this will not affect the use of the software. Apt-get upgrade update any installed software package apt-get dist-upgrade the system to the new version apt-cache search string search strings in the package list

 

Dpkg-l package-name-pattern lists any software packages that match the pattern. If you do not know the full name of the software package, you can use "* package-name-pattern *". Aptitude carefully checks installed or available software packages. Similar to apt-get, aptitude can be called through command lines, but it is limited to some commands-the most common commands are installation and uninstallation. Because

Aptitude is more suitable for installation and uninstallation than apt-get.

Apt-cache showpkg pkg displays the package information.

 

Apt-cache dumpavail prints a list of available software packages. Apt-cache show pkg displays package records, similar to dpkg-print-avail. Apt-cache pkgname prints the name of any package in the package list. Dpkg-S file: Which package is installed.

 

Dpkg-L package lists any documents in the software package.

 

Apt-file search filename searches for software packages containing specific documents (not necessarily installed). The document names of these documents contain specified strings. Apt-file is a separate software package. You must first install apt-get install and then run apt-file update. If apt-file search filename outputs too much content, you can try to use apt-file search filename | grep-w filename (only display the file names in which the specified string appears as the complete word) or similar methods, such: apt-file search filename | grep/bin/(only show documents in folders such as/bin or/usr/bin. If you are looking for a specific execution document, this is helpful ).

 

* Apt-get autoclean regularly runs this command to clear the. deb documents of uninstalled software packages. In this way, you can release a large amount of disk space. If your requirements are urgent, you can use apt-get clean to release more space. This command will delete the. deb document that has installed the software package. In most cases you will not use these. debs documents, so if you feel overwhelmed by insufficient disk space, this approach may be worth a try from: http://blog.sina.com.cn/s/blog_a74cb14b0101krh3.html

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.