YUM Common Commands for Linux Basic Commands

  

Yum (full name Yellow dog Updater, Modified) is a Shell front-end package manager for Fedora and RedHat and SUSE. Based on RPM package management, the RPM package can be automatically downloaded and installed from the specified server. The dependency relationship can be handled automatically, and all dependent software packages can be installed at one time without having to download and install it one by one. Yum provides commands for finding, installing, and deleting one, a group, or even all packages, and the commands are simple and easy to remember.


1. List all updateable software list commands: yum check-update2. Install all update software commands: yum update3. Install only the specified software commands: yum install 4. Only Update the specified software command: yum update 5. List all installable software list commands: yum list

Install and delete software with YUM installed system Adding and removing software is a common thing, yum can also be qualified for this task. As long as the software is installed by rpm. The command to install is yum install xxx, yum will query the database, if there is any package, if there is, check its dependency conflict relationship, if there is no dependency conflict, then it is best to download and install; if there is, it will give Prompt, ask if you want to install dependencies at the same time, or delete conflicting packages, you can make your own judgment. The command to delete is yum remove xxx. Like the installation, yum also queries the database and gives hints for resolving dependencies. 1. Use YUM to install the package command: yum install 2. Use YUM to remove the package command: yum remove

Use YUM to query software information. We often encounter such a situation, want to install a software, only know it It is related to a certain aspect, but it cannot know its name. At this time, the query function of yum will work. You can use the command yum search keyword to search. For example, if we want to install an Instant Messenger, but don't know what it is, then you can use the yum search messenger command to search, yum will search for all available rpm descriptions. , list all the rpm packages related to messeger in the description, so we may get gaim, kopete, etc. and choose from them. Sometimes we will also encounter the installation of a package, but do not know its purpose, we can use the yum info packagename command to get information. 1. Use YUM to find package commands: yum search 2. List all installable package commands: yum list3. List all updateable package commands: yum list updates 4. List all installed package commands: Yum list installed 5. List all package commands that are installed but not in Yum Repository: yum list extras6. List the specified package commands: yum list 7. Use YUM to get package information command: yum info 8. List Information command for all packages: yum info9. List all updateable package information commands: yum info updates10. List all installed package information commands: yum info installed11. List all installed but not in Yum Repository Package information command: yum info extras12. List which file commands are provided by the package: yum provides

Clear YUM cache yum will store the downloaded package and header in the cache without automatically deleting it. If we think that they take up disk space, you can use the yum clean command to clear it. The more precise usage is as follows: 1. Clear the package command in the cache directory (/var/cache/yum): yum clean packages 2. Clear the cache directory (/The headers command under var/cache/yum): yum clean headers3. Clear the old headers command under the cache directory (/var/cache/yum): yum clean oldheaders4. Clear the software under the cache directory (/var/cache/yum) Package and old headers command: yum clean, yum clean all (= yum clean packages; yum clean oldheaders) Centos change the source faster: cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo. Savewget http://centos.ustc.edu.cn/CentOS-Base.repo

Copyright © Windows knowledge All Rights Reserved