Linux instruction APT-GRT instruction use

Source: Internet
Author: User

Apt-get is a Linux directive, and the mainstream Linux version of Debian and Ubuntu uses Apt-get to install the software. So, where do you put the software you want to install???

Apt-get uses the Software installation source to install the software, and its software installation source is placed in the/etc/apt/sources.list file. That is, when we install a software using Apt-get installed, the system will go to the corresponding address through the software installation source on this file, so if the software installation source address is not local, then you need to network to complete the installation. If the default software installation source does not have the software to install, it cannot be installed successfully.

Within the/etc/apt/sources.list file, we can also set up our own software installation source, but after modifying the software installation source, you must perform a apt-get update to take effect. For example, pointing to the software in the disc to install a software, there is no need to network.

The following demo uses Apt-get to perform a line operation on a software (take nginx-full as an example)

sudo apt-get install nginx-full installation software

sudo apt-get remove nginx-full uninstall software, software is not available, but retention software configuration file

sudo apt-get remove--purge nginx-full uninstall software, software not available, while deleting software configuration files

sudo apt-get autoremove nginx-full uninstall software and dependent Nginx-full package (Nginx-common), software not available, but retention software configuration file

sudo apt-get autoremove--purge nginx-full uninstall software and dependent packages (Nginx-common), software unavailable, and software configuration files removed

Apt defaults to back up installed and uninstalled software, and if not, it takes up hard disk space and can be cleared using the following instructions:

sudo apt-get AutoClean Clear backup of uninstalled software

sudo apt-get clean clears backup of installed software

sudo apt-get update synchronizes the software source to get the latest package.

sudo apt-get upgrade updates the installed software, the updated version is the local index, so be sure to perform the update before upgrade is the latest

Apt-cache Search string

Dpkg-l Nginx-full View the location of the software documentation installation

Linux instruction APT-GRT instruction use

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.