Linux packages using yum query

Linux-based system of centos7,

1. List the package name, version information
[] # yum list installed lists all installed software
.. ..
installed packages
GConf2.x86_64 3.2.6-8.el7 @anaconda
GeoIP.x86_64 1.5.0 @anaconda -11.el7
ModemManager.x86_64 1.6.0-2.el7 @anaconda
ModemManager-glib.x86_64 1.6.0-2.el7 @anaconda
NetworkManager.x86_64. 1: 1.4.0-12.el7 @anaconda
NetworkManager-ADSL. . 1 the x86_64: 1.4.0-12.el7 @anaconda
NetworkManager-glib.x86_64. 1: 1.4.0-12.el7 @anaconda
NetworkManager-libnm.x86_64. 1: 1.4.0-12.el7 @anaconda
NetworkManager-libreswan.x86_64 1.2 @anaconda .4-1.el7
.. ..
yum.noarch 3.4.3-150.el7.centos @anaconda
yum-langpacks.noarch 0.4.2-7.el7 @anaconda
yum Metadata-1.1.4-parser.x86_64 -10.el7 @anaconda
yum-plugin-fastestmirror.noarch
1.1.31-40.el7 @anaconda
yum-utils.noarch 1.1.31-40.el7 @anaconda
zenity.x86_64 3.8.0-5.el7 @anaconda
zip.x86_64 3.0-11.el7 @anaconda
zlib.x86_64 1.2.7-17.el7 @anaconda

2. The list of all the software is not installed, but a package can provide a source
[] # yum List Available
.. ..
installable package
389-DS-base.x8664 1.3.5.10-11.el7 repocos7dvd
389-DS-Base 1.3.5.10-11.el7 repocos7dvd -libs.x8664
ElectricFence.x8664 2.2.2-39.el7 repocos7dvd
ImageMagick.x8664 6.7.8.9-15.el72 repocos7dvd
ImageMagick-c ++. x8664 6.7.8.9-15.el72
repocos7dvd
ImageMagick-perl 6.7.8.9-15.el72 repocos7dvd .x8664
.. ..
yum-plugin-aliases.noarch 1.1.31-40.el7 repocos7dvd
yum-plugin-changelog.noarch
1.1.31-40.el7 repocos7dvd
yum-plugin-tmprepo. 1.1.31-40.el7 repocos7dvd noarch
yum-plugin-verify.noarch 1.1.31-40.el7 repocos7dvd
yum-plugin-versionlock.noarch
1.1.31-40.el7 repocos7dvd
zlib-devel.x8664 1.2.7-17.el7 repocos7dvd
zsh.x8664 5.0.2-25.el7 repocos7dvd
**

3. Check software httpd, firefox, rar has been installed (this is an example of their cited)
[] the httpd Check List # yum the httpd
.. ..
installable software packages are not installed but the installation
httpd.x86_64 2.4.6 repo_cos7dvd -45.el7.centos
[] # yum List Firefox
.. ..
installed software packages installed
firefox.x86_64 45.4.0-1.el7.centos @anaconda
[] # yum List RAR
.. ..
error: no matching packages can be listed are not installed and no software provided by the source

4. Query package descriptions
(1) the main kernel package provides the Linux kernel to run the program:
[] # yum info kernel
.. ..
installed packages
name:
Architecture:
Version:
Release:
Size:
Source: i
come from source:
description:
URL:
protocol:
description:

(2) provides for the main package bash Linux system command line interpreter program (/ bin / bash):
[] # yum info bash
...
Installed packages
name:
Architecture:
Version:
Release:
Size:
Source: i
from the source
profile:
URL:
protocol:
description:

5. What can query packages provide a specific program / file
[] # yum provides "bin / vim" query program which package provided by vim
[] # yum provides / etc / redhat-release query file / etc / redhat- ** which package provided by the release

Guess you like

Origin blog.51cto.com/13594913/2415161