What is apt-Get?
Apt-get is a Linux Command, applicable to Deb package-managed operating systems. It is mainly used to automatically search, install, upgrade, and uninstall software or operating systems from the software warehouse 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
Modify/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 (seeAptitude)
Apt-Get remove packagename
Uninstall an installed software package (keep the configuration document)
Apt-Get -- purge remove packagename
Uninstall an installed software package (delete the configuration document)
Dpkg -- force-all -- purge packagename
Some software is hard to uninstall and can be used if it also blocks other software applications, but it is a little risky.
Apt-Get autoclean Apt
The installed or unloaded software is backed up on the hard disk. Therefore, if space is required, you can run this command to delete the software you have deleted.
Apt-Get clean
This command 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 packages
Apt-Get dist-Upgrade
Upgrade the system to a new version.
Apt-cache search string
Search for strings in the package list
Dpkg-l package-name-Pattern
List 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 check 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
Print the list of available software packages.
Apt-Cache show PKG
Displays package records, similar to dpkg-print-avail.
Apt-Cache pkgname
Print the name of any package in the package list.
Dpkg-s file
Which package is installed.
Dpkg-l package
List any documents in the software package.
Apt-file search filename
Find the software packages that contain specific documents (not necessarily installed). The document names of these documents contain the 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
Run this command regularly to clear the. Deb documentation for the 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. Therefore, if you feel overwhelmed by insufficient disk space, this method may be worth a try.
What is apt-Get?
Apt-get is a Linux Command, applicable to Deb package-managed operating systems. It is mainly used to automatically search, install, upgrade, and uninstall software or operating systems from the software warehouse 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
Modify/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 (seeAptitude)
Apt-Get remove packagename
Uninstall an installed software package (keep the configuration document)
Apt-Get -- purge remove packagename
Uninstall an installed software package (delete the configuration document)
Dpkg -- force-all -- purge packagename
Some software is hard to uninstall and can be used if it also blocks other software applications, but it is a little risky.
Apt-Get autoclean Apt
The installed or unloaded software is backed up on the hard disk. Therefore, if space is required, you can run this command to delete the software you have deleted.
Apt-Get clean
This command 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 packages
Apt-Get dist-Upgrade
Upgrade the system to a new version.
Apt-cache search string
Search for strings in the package list
Dpkg-l package-name-Pattern
List 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 check 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
Print the list of available software packages.
Apt-Cache show PKG
Displays package records, similar to dpkg-print-avail.
Apt-Cache pkgname
Print the name of any package in the package list.
Dpkg-s file
Which package is installed.
Dpkg-l package
List any documents in the software package.
Apt-file search filename
Find the software packages that contain specific documents (not necessarily installed). The document names of these documents contain the 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
Run this command regularly to clear the. Deb documentation for the 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. Therefore, if you feel overwhelmed by insufficient disk space, this method may be worth a try.