Check which software is installed in linux

Source: Internet
Author: User
RPM is the abbreviation of RedHatPackageManager. it is originally intended to manage RedHat software packages. as the name suggests, Red RPM is the abbreviation of Red Hat Package Manager, which is intended to manage Red Hat software packages, as the name suggests, it is the software package management contributed by Red Hat. it is used in mainstream release versions such as Fedora, Redhat, Mandriva, SuSE, and YellowDog, and on the basis of these versions; what are included in the RPM package? There are other files in addition to the license file. applications in an RPM Package sometimes require files of other specific versions in addition to the additional files they carry to ensure their normality, this is the dependency of the software package. the dependency is not exclusive to Linux and exists in Windows. for example, when we run 3D games in Windows, he may prompt that you want to install Direct 9; Linux and Windows work in similar ways; software installation flowchart:
Scope of use:

1. This document describes the rpmmanaged software. the software installed with make and make install is invalid for the file.tar.gz or file.tar.bz2 source code package;
2. when installing software, it is best to use the system software package management tools provided by the respective releases. for Fedora/Redhat, you can refer to the following articles; 1) fedora system management software package tool system-config-packages to conveniently add and remove software packages provided by the system installation disk. for details, see Fedora software package manager system-config-packages 2) redhat system management software package tool. The new system should be redhat-config-packages, which is used in the same way as Fedora software package manager system-config-packages. 3) apt + synaptic software package online installation, removal, and upgrade tools; usage: install or upgrade Fedora core 4.0 software package online with apt + synaptic
4) yum software package online installation, upgrade, and removal tools; usage: Fedora/Redhat online installation and update software package, yum article 5) all the yum and apt tutorials apt and yum are now very mature. we recommend that you use apt or yum when installing the software. if you install the software package provided by the system disk, you can use system-config-packages or redhat-config-packages;
1. usage of RPM Package management;
1. you can install, delete, upgrade, and manage software. of course, you can also install and upgrade software online;
2. you can use RPM to check which files are included in the software package and which software package the file belongs;
3. check whether or not the software package in the query system is installed and its version;
4. as a developer, you can package your program as an RPM Package for release;
5. import, verify, and release of the software package signature GPG and MD5
6. check the dependency to see if any software package has disrupted the system due to incompatibility;
2. RPM usage permission;

Only root permissions can be used to install, delete, and update RPM software. any user can perform operations on the query function. if a common user has the permission to install directories, the RPM software can also be installed;
III. simple rpm usage;

In addition to the software package manager, we can also use rpm commands to install software packages. can all software packages be installed using rpm commands? No, the file ends with a. rpm suffix. sometimes we find file. rpm on some websites and install it with rpm;

1) initialize the rpm database;

Run the rpm command to check whether an rpm Package is installed. The rpm database is also used. Therefore, we often use the following two commands to initialize the rpm database;

[Root @ localhost beinan] # rpm -- initdb
[Root @ localhost beinan] # rpm -- rebuilddb note: This takes a long time;

Note: These two parameters are extremely useful. sometimes the rpm system has a problem and cannot be installed or queried. most of them have a problem here;

2) query functions of RPM software package management:

Command format

Rpm {-q | -- query} [select-options] [query-options]

The query function of RPM is extremely powerful and one of the most important functions. For more details, refer to # man rpm.

1. query the software installed in the system;
1) query the installed software;

Syntax: rpm-q software name

Example:

[Root @ localhost beinan] # rpm-q gaim
Gaim-1.3.0-1.fc4

-Q is -- query, which means "q" in Chinese. this command indicates whether gaim is installed in the system. if gaim is installed, information is output. if gaim is not installed, the uninstalled gaim information is output. to view all installed packages in the system, add the-a parameter;

[Root @ localhost RPMS] # rpm-qa


If you view it by page, add another pipeline | and more commands;

[Root @ localhost RPMS] # rpm-qa | more

Find a software in all installed software packages, such as gaim. you can use grep to extract the software;

[Root @ localhost RPMS] # rpm-qa | grep gaim

The above function is the same as that output by rpm-q gaim; 2) query the software package of an installed file;

Syntax rpm-qf file name


Note: the absolute path of the file name should be pointed out as an example:

[Root @ localhost RPMS] # rpm-qf/usr/lib/libacl. la
Libacl-devel-2.2.23-8

3) query where all installed software packages are installed;

Syntax: rpm-ql software name or rpm rpmquery-ql software name

Example:

[Root @ localhost RPMS] # rpm-ql lynx
[Root @ localhost RPMS] # rpmquery-ql lynx

4) query the information of an installed software package

Syntax format: rpm-qi software name

Example:

[Root @ localhost RPMS] # rpm-qi lynx

5) Check the configuration file of the installed software;

Syntax format: rpm-qc Software name

Example:

[Root @ localhost RPMS] # rpm-qc lynx

6) view the installation location of a software installation document:

Syntax format: rpm-qd software name

Example:

[Root @ localhost RPMS] # rpm-qd lynx

7) check the software packages and files on which the software is installed;

Syntax: rpm-qR software name

Example:

[Root @ localhost beinan] # rpm-qR rpm-python

Query the summary of installed software: for a software package that has been installed, we can combine a series of parameters, such as rpm-qil. for example:

[Root @ localhost RPMS] # rpm-qil lynx


2. View uninstalled software packages:

The premise is that you have a. rpm file, that is to say, to view the existing software file. rpm, etc.; 1) view the purpose and version of a software package;

Syntax: rpm-qpi file. rpm

Example:

[Root @ localhost RPMS] # rpm-qpi lynx-2.8.5-23.i386.rpm

2) view the files contained in a software package;

Syntax: rpm-qpl file. rpm

Example:

[Root @ localhost RPMS] # rpm-qpl lynx-2.8.5-23.i386.rpm

3) view the document location of the software package;

Syntax: rpm-qpd file. rpm

Example:

[Root @ localhost RPMS] # rpm-qpd lynx-2.8.5-23.i386.rpm

5) view the configuration file of a software package;

Syntax: rpm-qpc file. rpm

Example:

[Root @ localhost RPMS] # rpm-qpc lynx-2.8.5-23.i386.rpm

4) view the dependency of a software package

Syntax: rpm-qpR file. rpm

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.