-
1. How To Install Rpm In Linux?
#rpm –ivh package name
// to install a RPM we need to use -i option.
-
2. How To Remove A Rpm?
#rpm -e package name
// to remove a RPM file we need to use -e option.
-
3. How To Upgrade A Rpm?
#rpm -Uvh package name
// To upgrade a RPM we need to use -U option.
-
4. How To Check Installed Rpm?
#rpm -qa package name
// To list or find an installed RPM we need to use -q option.
-
5. How To List All Files Of An Installed Rpm Package?
#rpm -ql package name
// To list all files of installed rpm we need to use -ql (query list) option.
-
6. How To Install A Rpm Package Without Dependencies?
#rpm -ivh –nodeps packagename
// To install a RPM without any dependencies we need to use –nodeps option.
-
7. How To Check Dependencies Of Rpm Package Before Installing?
#rpm -qpR package name
// To check the dependency for a RPM we need to use -qpR option.
-q: Query a package
-p: List capabilities this package provides.
-R: List capabilities on which this package depends.
-
8. How To Check An Rpm Signature For A Package?
#rpm –checksig packagename.rpm
// We need to use the option –checksig for signature verification.
-
9. How To List Recently Installed Rpm Packages?
#rpm -qa –last
// To list recently installed RPM we need to use –last option.
-
10. How To Query A File That Belongs Which Rpm Package?
#rpm -qf /etc/passwd
// To find a file owned by which package.
-
11. Get The Information Of Rpm Package Before Installing?
#rpm -qip packagename.
-
12. How To Verify A Rpm Package?
#rpm -Vp
// To verify the installed RPM.
-
13. How To List All Imported Rpm Gpg Keys?
#rpm -qa gpg-pubkey.
-
14. How To Remove An Rpm Package Without Dependencies?
#rpm -ev –nodeps package name // same –nodeps option we need to use.
-
15. How To Rebuild Corrupted Rpm Database?
# cd /var/lib
# rm __db*
# rpm –rebuilddb
# rpmdb_verify Packages
-
16. How To Check The Installed Software(rpm’s) On Red Hat Linux?
rpm -qa package_name (or) rpm -qa |grep package_name
Ex:
[root@mylinz ~]# rpm -qa yum
yum-3.2.27-14.el6.noarch
[root@mylinz ~]# rpm -qa |grep yum
yum-rhn-plugin-0.9.1-5.el6.noarch
yum-utils-1.1.26-11.el6.noarch
yum-metadata-parser-1.1.2-14.1.el6.x86_64
yum-3.2.27-14.el6.noarch
PackageKit-yum-0.5.8-13.el6.x86_64
PackageKit-yum-plugin-0.5.8-13.el6.x86_64
[root@mylinz ~]#
-
17. How To Install Specific Software Package Using Rpm Command On Redhat Linux?
rpm –ivh package name
-
18. How To Remove The Software Package From On Red Hat Linux?
rpm -eV package_name
-
19. How To Upgrade The Existing Red Hat Package Using Rpm Command?
rpm -Uvh package_name
-
20. How To Display The List Of Installed Software Package’s Files?
rpm -ql package_name
Ex:
[root@mylinz ~]# rpm -ql yum-rhn-plugin-0.9.1-5.el6.noarch
/etc/yum/pluginconf.d/rhnplugin.conf
/usr/share/doc/yum-rhn-plugin-0.9.1
/usr/share/doc/yum-rhn-plugin-0.9.1/LICENSE
/usr/share/locale/ar/LC_MESSAGES/yum-rhn-plugin.mo
/usr/share/locale/as/LC_MESSAGES/yum-rhn-plugin.mo
/usr/share/locale/bg/LC_MESSAGES/yum-rhn-plugin.mo
/usr/share/locale/bn/LC_MESSAGES/yum-rhn-plugin.mo
-
21. How To Find Files Belongs To Which Rpm Package?
rpm -qf file_location
Ex:
[root@mylinz ~]# rpm -qf /etc/yum.conf
yum-3.2.27-14.el6.noarch
[root@mylinz ~]#
-
22. How To Display List Of Configuration Files For Specific Package?
rpm -qc package_name
Ex:
[root@mylinz ~]# rpm -qc yum
/etc/logrotate.d/yum
/etc/yum.conf
/etc/yum/version-groups.conf
[root@mylinz ~]#
-
23. How To Get The List Of Dependencies For Specific Rpm File?
rpm -qpR rpm_file
Ex:
[root@mylinz ~]# rpm -qpR nautilus-sendto-2.28.2-3.el6.x86_64.rpm
/bin/sh
/bin/sh
/bin/sh
GConf2
GConf2
GConf2
libORBit-2.so.0()(64bit)
libatk-1.0.so.0()(64bit)
libbonobo-2.so.0()(64bit)
libbonobo-activation.so.4 ()(64bit)
-
24. How To Get The List Of Dependencies For Specific Package?
rpm -qR package_name
Ex:
[root@mylinz ~]# rpm -qR yum
/usr/bin/python
config(yum) = 3.2.27-14.el6
pygpgme
python >= 2.4
python(abi) = 2.6
python-iniparse
python-sqlite
python-urlgrabber >= 3.9.0-8
rpm >= 0:4.4.2
rpm-python
rpmlib(Compressed Filenames) <= 3.0.4-1
rpmlib(File Digests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum-metadata-parser >= 1.1.0
rpmlib(PayloadIsXz) <= 5.2-1
[root@mylinz ~]#
-
25. How To Remove The Package Without Checking The Dependencies On Red Hat Linux?
rpm -ev –nodeps package_name
Networking Interview Questions
Networking Tutorial
FTP Script Interview Questions
Unix/Linux Tutorial
Linux File Systems Interview Questions
Ansible (software) Interview Questions
Unix makefile Tutorial
Advanced Linux Interview Questions
Networking Interview Questions
Unix/Linux Interview Questions
Oracle Retail Merchandising System Interview Questions
FTP Script Interview Questions
Unix Shell Scripting Interview Questions
yum Interview Questions
Linux File Systems Interview Questions