Common uses for Yum commands in Linux

Source: Internet
Author: User

Yum-y Install package name (Support *): automatic selection of y, automatic
Yum Install package name (support *): Manually select Y or n
Yum Remove Package name (* not supported)
RPM-IVH Package Name (support *): Install RPM Package
RPM-E Package name (not supported *): Uninstall RPM Package

Here are some of the packages I've packed in my work:

Use SecureCRT to upload and download files using RZ and SZ, and to install RZ and SZ
Yum-y Install Lrzsz

Download files
SZ xxx.tar.gz

Uploading files
Rz

upgrading Common library files

The code is as follows Copy Code
Yum-y Install gcc gcc-c++ autoconf
Yum-y Install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel cur L Curl-devel ncurses Ncurses-devel


Install make command

The code is as follows Copy Code
Yum-y Install make

Installation VI

The code is as follows Copy Code
Yum-y Install vim-enhanced

Complete the command is vim, add a link

The code is as follows Copy Code
Ln-s/usr/bin/vim/bin/vi

Install locate

The code is as follows Copy Code
Yum-y Install Mlocate

Install patch

The code is as follows Copy Code
Yum-y Install patch

To install synchronization time

The code is as follows Copy Code
Yum Install-y NTP
Ntpdate ntp.api.bz

Where are the files after the Yum installation?
View/etc/yum.conf
There is a cachedir setting, which defaults to the/var/cache/yum
The downloaded files are not saved by default, and are automatically deleted when the installation is complete.
To save, modify the Keepcache and change the 0 to 1.
That

The code is as follows Copy Code
Cachedir=/var/cache/yum
Keepcache=1

The Yum command form is generally as follows: Yum [options] [command] [package ...]
Options are optional, including-H (Help),-y (when the installation prompts you to select all "Yes"), Q (does not display the installation process), and so on. [command] for the action to be taken, [package ...] Is the object of the operation.

Some of the most commonly used commands include:

Auto Search fastest Mirroring plugin: Yum install Yum-fastestmirror
Install Yum graphics window plugin: Yum install Yumex
To view a list of possible bulk installations: Yum Grouplist

1 installation

The code is as follows Copy Code
Yum Install all installed
Yum Install Package1 Install the specified installation package Package1
Yum groupinsall group1 Installer group group1

2 Updates and Upgrades

The code is as follows Copy Code
Yum Update all Updates
Yum Update Package1 the specified package Package1
Yum check-update Check for updatable programs
Yum Upgrade Package1 Upgrade the specified package Package1
Yum groupupdate group1 upgrade program group Group1

3 Find and display

The code is as follows Copy Code
Yum Info package1 Display installation package information Package1
Yum list shows all packages that have been installed and can be installed
Yum List Package1 shows the installation of the specified package Package1
Yum groupinfo group1 Display program group group1 information Yum Search string finds an installation package based on a keyword string

4 Removing programs

The code is as follows Copy Code
Yum Remove & #124; Erase Package1 Remove Package Package1
Yum groupremove group1 Delete program group group1
Yum deplist package1 Viewing program package1 dependencies

5 Clear Cache

The code is as follows Copy Code
Yum Clean packages clears the packages under the cache directory
Yum clean headers clears the headers in the cache directory
Yum clean oldheaders clears the cache directory of old headers
Yum clean, yum cleaned all (= Yum cleaning packages; yum Clear oldheaders) clears the packages under the cache directory and the old headers

I have summed up some methods of using Yum function.

The code is as follows Copy Code

Yum check-update//Check all packages that can be updated

Yum Update//Download all packages that are installed on the update system

Yum upgrade//Large version upgrades, unlike Yum Update, even old obsolete packages are upgraded

Yum Install <packages>//Install new Package

Yum update <packages>//update the specified package

Yum Remove <packages>//Uninstall the specified package

Yum Groupinstall <groupnames>//installation of packages in the specified software group

Yum groupupdate <groupnames>/update packages in the specified software group

Yum groupremove <groupnames>/Uninstall packages in the specified software group

Yum grouplist//View the software groups that are already installed and available in the system

Yum List//list all the RPM packages that can be installed or updated and installed in the repository

Yum list <regex>//list of available RPM packages that match regular expressions in the repository can be installed or updated and installed

Yum list available//list all the RPM packages that can be installed in the repository

Yum list available <regex>/list all available RPM packages that match regular expressions in the repository

Yum list updates//list all the RPM packages in the repository that can be updated

Yum list updates <regex> list all updatable RPM packages that match regular expressions in the repository

Yum list installed//list all installed RPM packages in the repository

Yum List installed <regex>/list all installed RPM packages in the repository that match regular expressions

Yum list Extras//List of RPM packages that have been installed but not included in the repository

Yum List Extras <regex>/lists the RPM packages that have been installed that match the regular expression but are not included in the repository

Yum List recent//list of packages that have recently been added to the repository

Yum Search <regex>/* Detects the names, descriptions, overviews, and listed maintainers of all available software, looking for and regular

The value of the expression match * *

Yum provides <regex>//testing packages included in the files and software provided by the function to find a match with the regular expression of the value

Yum Clean headers//Clear the RPM header file in the cache

Yum Clean packages//Clear cache of RPM package files

Yum Clean all//clear the RPM header files and package files in the cache

Yum deplist <packages>//Display dependency information for software packages

Related Article

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.