Linux system yum or apt or get method

Source: Internet
Author: User
Linux can be roughly divided into two categories: RedHat branch redhat, centos, mandrake, mandriva, and domestic red x. 1. Common installation package format rpm packages, the command for installing the rpm package is "rpm-parameters". Package management tool yum3 supports the tar package Debian branch, ubuntu, and other common installation package formats, the command for installing the deb package is "dpk

Linux can be roughly divided into two categories

 

RedHat branch

Redhat,Centos, Mandrake, mandriva, domestic red x, etc.

1. the common installation package format is rpm. the command for installing the rpm package is "rpm-parameter"

2 package management tool yum

3. support for tar packages

 

Debian branch

Debian, ubuntu, etc.

1. the common installation package format is deb. the command for installing deb package is "dpkg-parameter"

2 package management tool apt-get

3. support for tar packages

 

Common yum commands


Yum clean all clear yum cache
Yum list lists software in the yum source
Yum install packagename installation package
Yum remove packagename remove package
Yum search packagename search package
Yum check-update check the software packages that can be updated
Yum list installed lists installed software packages
Yum info packagename view package information
Upgrade all software packages using yum update
Yum update packagename upgrade specified software package
Yum upgrade all software packages (as long as everything in the system has updated all updates)

 

RPM

Rpm is a software package management mechanism of redhat. it is directly installed and deleted using rpm commands. its biggest advantage is that it automatically handles the possible dependencies of various software packages.

 

Installation: rpm-ivh *. rpm ---- can be used for online installation.

Uninstall: rpm-e packagename

Query all installation packages: rpm-qa

Query an installation package: rpm-q packagename

Rpm-qa | grep name

Upgrade: rpm-Uvh packagename

Query the software installation path: rpm-qc name

Query which rpm Package is generated for a file: rpm-qf/etc/yum. conf -- file path

Add Resource Library

For example, add rpm.livna.org as the Resource Library.

Install Livna.org rpms GPG key rpm -- importhttp: // rpm.livna.org/RPM-LIVNA-GPG-KEY

 

Common apt-get commands


Apt-file list packagename list the files contained in a software package
Apt-get update updates the database cache on the local machine
Apt-cache search packagename: find a software package containing some keywords
Apt-get install packagename install the specified software
Apt-get remove packagename uninstall software
Apt-get -- purge remove packagename uninstall software completely including delete configuration
Apt-get source packagename download package source code
Apt-get -- reinstall install packagename fix or install the latest version only
Apt-get clean clear all cached files
Apt-cache show packagename)

 

DPKG

Dpkg is short for Debian [waiting for bin] Package. A suite management system specially developed for Debian to facilitate software installation, update, and removal. All Debian-based Linux distributions use dpkg, such as Ubuntu and Knoppix.

 


Dpkg-I packagename install a Debian software package
Dpkg-c packagename: list packagename content
Dpkg-r packagename remove an installed package
Dpkg-P packagename completely clears an installed package (including the preparation file)
Dpkg-L packagename: list all files installed by packagename
Dpkg-s packagename displays information about packages installed
Dpkg-reconfigure packagename re-prepare an installed package

 


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.