Ubuntu Software Management

Source: Internet
Author: User
Tags unpack

At present Ubuntu system mainly has dpkg and apt two kinds of software management way
The two differences are as follows

1. dpkg is used to install the. deb file, but does not resolve the dependencies of the module and does not care about software in Ubuntu's software warehouse, which can be used to install local deb files.
2, APT will solve and install the module dependency problem, and will consult the software warehouse, but will not install the local deb file, APT is built on the DPKG software management tools.

One, apt command installation

The APT full name Advanced Packaging Tool, which can automatically download, configure, install binary or source-code packages, simplifies the process of managing software on Linux systems. Apt is now included in Debian and its derivative distributions, such as Ubuntu. Apt Command (package name):

    • Apt-get Install Package
    • Apt-get Install Package–reinstall Reinstall package
    • Apt-get-f Install mandatory installation
    • Apt-get Remove Package
    • Apt-get Remove Package–purge Delete the package, including deleting the configuration file, etc.
    • Apt-get Autoremove automatically removes unwanted packages, removes packages that are installed to meet the dependencies of other packages, but is no longer needed
    • Apt-get Update Source
    • Apt-get Upgrade update installed packages will not be processed if the dependencies change
    • Apt-get Dist-upgrade Upgrade system automatically intelligently handles packet dependent relationships, depending on dependencies may remove or install packages
    • Apt-get Dselect-upgrade using Dselect upgrade
    • Apt-get BUILD-DEP Package Installation related to the compilation environment, BUILD-DEP parameter refers to the establishment of a software to compile the environment, such as now to manually compile pidgin, if you want to get the compiler to pass, you can execute sudo apt-get BUILD-DEP Pidgin To configure the software packages that need to be used during the compilation process.
    • Apt-get Source Package Downloads The source code for the bundle
    • Apt-get AutoClean Apt will back up the installed or unloaded software on the hard drive, so if you need space, you can let this command to delete the software you have deleted
    • Apt-get Clean This command will also remove the backup of the installed software, but this will not affect the use of the software. When we install the package through Apt-get, APT will download the package to the local/var/cache/apt/archives/directory. This command deletes all the packages in the folder except those that are locked out.
    • Apt-get Check to see if there is a corrupted dependency

    • Apt-cache Search Package
    • Apt-cache Show package for information about packages, such as description, size, version, etc.
    • Apt-cache depends package learn about using dependencies
    • Apt-cache Rdepends package to understand a specific dependency

In addition to understanding the basic apt directives, you need to know some of the following apt-related files, each of which functions as follows:

    • /etc/apt/sources.list set up the source for the package
    • /etc/apt/apt.conf APT configuration file
    • /ETC/APT/APT.CONF.D APT's fragmented configuration file
    • /etc/apt/preferences version Parameters
    • /var/cache/apt/archives/partial storing the packages being downloaded
    • /var/cache/apt/archives Storage of downloaded packages
    • /var/lib/apt/lists storing the downloaded package details
    • /var/lib/apt/lists/partial Store the package details that are being downloaded

Second, dpkg command installation

Dpkg is the foundation of the Debian Package Manager and is used to install, unload, and supply information related to. deb packages. Dpkg itself is a low-level tool that itself cannot download packages from the remote package repository and handle the dependencies of the package, and the package needs to be downloaded from the remote and then installed. Dpkg Common commands:

    • Dpkg-i Package.deb installation Package
    • Dpkg-r Package Delete Packages
    • Dpkg-p Package Delete packages (including configuration files)
    • Dpkg-l package lists the files associated with the bundle
    • Dpkg-l package shows the version of the bundle
    • Dpkg–unpack Package.deb Unpack the contents of the Deb package
    • The Dpkg-s file belongs to which installed package is similar to Apt-file search file, but apt-file updates the database from the source and looks for a package that does not have a file for this machine
    • Dpkg-l List of currently installed packages
    • Dpkg-c Package.deb Listing the contents of the Deb package
    • Dpkg–configure Package Configuration Packages

Note: More options are available through dpkg-h queries, and some instructions require Superuser privileges to execute.

Ubuntu Software Management

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.