Linux Package Management

Source: Internet
Author: User


First, management. Deb Package: dpkg

This section provides a brief introduction to the common options and considerations for dpkg, and the dpkg is primarily intended for both Debian and Ubuntu releases.

    1. Install packages

dpkg Use the-install option to install the software, this option can be abbreviated to-I. The-install or-i option removes the old version of the system before installing the package.

To view installed packages

The DPKG-L option lists the packages that are already installed on the current system. This command works with the grep channel and the Search command

$dpkg-L | grep OpenSSH

II Openssh-client 1:4.7p1-8ubuntu1.2 Secure Shell Client,an RLOGIN/RSH/RCP RelA

$dpkg-S OpenSSH # #dpkg提供了--search (-s) to search for installed packages

Uninstall Package dpkg the--remove (-r) option to uninstall a package that has already been installed. $dpkg-L | grep Opera # #查看opera浏览器的软件包信息 $sudo dpkg--remove Opera # #删除Opera浏览器

Second, management RPM package: rpm

Similarly, the RPM tool is used to manage packages in. rpm format. This package management tool is used for most Linux distributions

  1. Install package: rpm-i

    Install a package using the Rpm-i command. The-v option is used to display the work that RPM is currently performing. -h option to remind users of the current installation progress by printing a series of #

    $sudo RPM-IVH dump-0.4.b41-1.src.rpm

  2. Upgrade Package Rpm-u

    $sudo rpm-u dump-0.4.b41-1.src.rpm # #升级dump

  3. Check for installed packages rpm-q

    $rpm-Q Check # #检查check软件包信息

    If the user forgets the full package name of the package. You can use RPM-QA to list all the packages that are already installed on the current system, and to match the pipeline and grep commands to find the package you want

    $rpm-qa | grep xorg # #查找名字中包含xorg的软件包

  4. Uninstalling packages

    Use the RPM-E command to uninstall the package. Be sure to determine the package name before uninstalling the package. RPM-E command receives the name of the package as a parameter

    $sudo rpm-e Tcpdum # #从系统中删除tcpdump包

    You can use the Rpm-e--test parameter to simulate the process of deleting a package. Avoid incorrect removal of packages

Third, advanced package tools Apt

The advent of the RPM and DPKG Package Manager significantly reduces the amount of software installed. However, these tools do not solve dependency problems. Advanced package management tools such as APT and Yum have emerged.

1.APT Introduction. APT (Advance Package tool) advanced software packages tools. This is the most sophisticated package management system today. It can automatically detect software dependencies, download and install all files, and apt has been ported to the release version using the RPM package mechanism. The RPM version of Apt can be obtained from apt-rpm.org.

APT tools are commonly used in two commands: Apt-get and Apt-cache. The Apt-get command is used to perform all operations related to package installation; Apt-cache is primarily used to find information about packages. At the first boot of the system, you will need to run the Apt-get update to update the package information in the current Apt-get cache. After that, you can install the package using the Apt-get Install command.

Apt-get Common Commands

Command
Describe
Apt-get Install
Download and install the package
Apt-get Upgrade
Download and install the latest version of the software package available on this system
Apt-get Remove
Uninstalling specific Packages
Apt-get Source
Download specific package source code
Apt-get Clean
Delete all package files that have already been downloaded

Remove Package tremulous

$sudo apt-get Remove tremulous

Querying package information

$apt-cache Search Flight # #搜索带 "Flight" package

$apt-cache depends FlightGear # #查询flightgear的依赖关系

Configure Apt-get

Where does apt-get download the software? All apt-get addresses used for download--often referred to as installation sources--are placed in the /etc/apt/sources.list file.

This article is from the "Ah Cool blog source" blog, please make sure to keep this source http://aku28907.blog.51cto.com/5668513/1786251

Linux Package 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.