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
rpm -qa | grep 软件名
: Query whether there is a certain software in the installed rpm list
rpm -qa
: Query all installed rpm packages
rpm -qa | more
: Paging display, query all installed rpm packages
rpm -q 软件包名
: Query whether the package is installed
rpm -qi 软件包名
: Query package information
rpm -ql 软件包名
: query the files in the package; query where the files of the rpm package are installed'
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
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 rpm package
rpm -ivh RPM包全路径名称
Parameter Description
i = install install
v = verboes prompt
h = hash progress bar