rpm interview questions and answers



Q: How to install packages with all the dependency packages if all the packages are available at a common repository?
Ans : rpm –ivh  –aid packagename.


Q: How to check, where a particular package installed it’s configuration files.
Ans : rpm –qc packagename.


Q: How to check the change log of the installed package.
Ans : rpm -q –changelog packagename.


Q: How to check, where a particular package installed it’s doc files.
Ans : rpm -qd packagenme


Q: How to check all the files installed by package?
Ans : rpm -q –filesbypkg packagename


Q: How to check the version of files installed by a package
Ans : rpm -qi packagename


Q: How to check the dependencies for a particular packages i.e. Required libraries packages etc.
Ans : rpm -q -R packagename.


Q: How to upgrade the packages which are already installed on to the linux box.
Ans : rpm -F install options packagename.


Q: What is the command to update only the rpm database.
Ans : rpm -i –justdb packagename


Q: What is the command to check whether a particular package installation would be successful but would not actually install the package.
Ans : rpm -ivh –test packagename


Q: How to check that a particular file belong to which package
Ans : rpm -qf filename


Q: How to list files in  a package
Ans : rpm -ql packagename


Q: How to verify whether the files installed by package are intact or been tampered/corrupted.
Ans : rpm -qs packagename


Q: What is the command to create a new RPM Database
Ans : rpm –initdb


Q: What is the command to rebuild the RPM Database
Ans : rpm –rebuilddb


What is the RPM switch for only installing packages?
The command line switch for installing an RPM is -i.

What is the command used to install an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to install an RPM package is rpm -ivh. Following command will install the given package
#rpm -ivh demofilename2.2-2.i386.rpm

What is the command used to remove an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to remove an RPM package is rpm -evh. Following command will remove the given package
#rpm -evh demofilename2.2-2.i386.rpm

What is the command used to update an RPM package named demofilename2.2-2.i386.rpm?
The most common command used to update an RPM package is rpm -Uvh. Following command will update the given package and remove the old.
#rpm -Uvh demofilename2.2-2.i386.rpm

Which command is used to see which RPM version of gzip was installed on the system?
#rpm -q gzip

Where are the automatically mounted file systems listed?
The automatically mounted file systems are listed in the file /etc/fstab.

While installing the new RPM what common steps should take ?
You should follow these common steps
  • Use RPM tools should be used to query or verify the installed packages to
  • confirm the installation of any previous packages.
  • Check the signature of new package
  • RPM should be installed or upgraded by first using the test mode to verify that it works, and then it should be installed
  • At the end query the RPM and verify the installation of RPM


No comments:

Post a Comment