[Linux] Package Management Tool: RPM

RPM


Introduction to RPM

The rpm command is a management tool for RPM packages. rpm was originally a program used by the Red Hat Linux distribution to manage various Linux suites. It is very popular because it follows the GPL rules and is powerful and convenient. Gradually adopted by other distributions. The emergence of the RPM package management method makes Linux easy to install and upgrade, which indirectly improves the applicability of Linux.

rpm common commands

r p m q a | g r e p soft subject name

rpm -qa | grep 软件名: Query whether there is a certain software in the installed rpm list

r p m q a

rpm -qa : Query all installed rpm packages
r p m q a | m O r e

rpm -qa | more : Paging display, query all installed rpm packages
r p m q soft subject Bag name

rpm -q 软件包名 : Query whether the package is installed
r p m q a soft subject Bag name

rpm -qi 软件包名 : Query package information
r p m q l soft subject Bag name

rpm -ql 软件包名 : query the files in the package; query where the files of the rpm package are installed'
r p m q f Arts subject Complete road path name

rpm -qf 文件全路径名 : Query the software package to which the file belongs; query which rpm package the file belongs to

Example

1. Query which rpm package /etc/passwd belongs to

[root@localhost ~]# rpm -qf /etc/passwd
setup-2.8.71-7.el7.noarch

Wholesale load r p m Bag r p m e R P M Bag of name say

uninstall rpm package

rpm -e RPM包的名称

Example

1. Uninstall the firefox package:rpm -e firefox

[root@localhost ~]# rpm -e firefox    //卸载firefox
[root@localhost ~]# rpm -qa | grep firefox  //查找firefox
[root@localhost ~]# rpm -ql  firefox        //查找firefox安装包文件
未安装软件包 firefox 

install Pack r p m Bag

install rpm package

rpm -ivh RPM包全路径名称

Parameter Description

i = install install

v = verboes prompt

h = hash progress bar

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325478043&siteId=291194637