Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use the rpm command in Linux

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install and use the rpm command in Linux, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

Now many people are using the Linux operating system, so it is very important to master all kinds of commands in the Linux operating system. Although more than N people now use yum to replace the Linux rpm command, rpm still plays a role in some vulgar situations.

For example, query and verify the installed rpm package, the full name of the Linux rpm command is Redhat Package Manager, which is a packaging and installation tool for downloading packages on the Internet. it is included in some Linux distributions and generates files with .RPM extension, similar to Dpkg.

1.Linux rpm command to install the software package

Rpm-ivh * * .rpm where I is the installation, v is the output, h is the progress mark

two。 Upgrade package

Rpm-Uhv *. Rpm

3. Delete software package

Rpm-e package_name

Rpm-e-nodeps package_name does not consider dependency packages

Rpm-e-allmatches package_name deletes all versions of packages that match package_name

4. Query software package

Rpm-Q package_name

Rpm-qp * *. Rpm gets the information about the rpm package in the current directory

Rpm-qa | less lists all installed software packages

Rpm-qf / etc/sysctl.conf to see which package a file belongs to

Rpm-qi package_name lists the standard details of the installed package

Rpm-qlp package_name lists the file contents of the rpm package

Rpm-Q-scripts kernel | less lists the pre-installation and post-installation scripts that come with the installed rpm package

Rpm-qa-queryformat 'Package% {NAME} was build on% {BUILDHOST}\ n' | less queryformat's powerful query

Rpm-querytags | less can list all the variables that queryformat can use to combine into a more powerful query

5. Check installed packages

Rpm-Va | grep bin

Check for failed characters:

S: file size does not match, M: mode does not match, 5:MD5 checksum does not match, U: user ownership does not match, G: user group ownership does not match, T:mTime does not match

6. Rebuild the Linux rpm command database

Rm / var/lib/rpm/__db.00*

Rpm-rebuilddb uses this when the rpm database is corrupted and the software package cannot be installed

7. Extract files from rpm

Rpm2cpio * * .rpm | cpio-idv / path / file name

Thank you for reading this article carefully. I hope the article "how to install and use rpm commands in Linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report