Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management

Shilpa Nair has just graduated in the year 2015. She went to apply for Trainee position in a National News Television located in Noida, Delhi. When she was in the last year of graduation and searching for help on her assignments she came across Tecmint. Since then she has been visiting Tecmint regularly.

Linux Interview Questions on RPM

Linux Interview Questions on RPM

All the questions and answers are rewritten based upon the memory of Shilpa Nair.

“Hi friends! I am Shilpa Nair from Delhi. I have completed my graduation very recently and was hunting for a Trainee role soon after my degree. I have developed a passion for UNIX since my early days in the collage and I was looking for a role that suits me and satisfies my soul. I was asked a lots of questions and most of them were basic questions related to RedHat Package Management.”

Here are the questions, that I was asked and their corresponding answers. I am posting only those questions that are related to RedHat GNU/Linux Package Management, as they were mainly asked.

1. How will you find if a package is installed or not? Say you have to find if ‘nano’ is installed or not, what will you do?

Answer : To find the package nano, weather installed or not, we can use rpm command with the option -q is for query and -a stands for all the installed packages.

# rpm -qa nano
# rpm -qa | grep -i nano


Also the package name must be complete, an incomplete package name will return the prompt without printing anything which means that package (incomplete package name) is not installed. It can be understood easily by the example below:

We generally substitute vim command with vi. But if we find package vi/vim we will get no result on the standard output.

# vi
# vim

However we can clearly see that the package is installed by firing vi/vim command. Here is culprit is incomplete file name. If we are not sure of the exact file-name we can use wildcard as:

# rpm -qa vim*


This way we can find information about any package, if installed or not.

2. How will you install a package XYZ using rpm?

Answer : We can install any package (*.rpm) using rpm command a shown below, here options -i (install), -v (verbose or display additional information) and -h (print hash mark during package installation).

# rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm

Preparing...                          ################################# [100%]
Updating / installing...
   1:peazip-1.11-1.el6.rf             ################################# [100%]

If upgrading a package from earlier version -U switch should be used, option -v and -h follows to make sure we get a verbose output along with hash Mark, that makes it readable.

3. You have installed a package (say httpd) and now you want to see all the files and directories installed and created by the above package. What will you do?

Answer : We can list all the files (Linux treat everything as file including directories) installed by the package httpd using options -l (List all the files) and -q (is for query).

# rpm -ql httpd

4. You are supposed to remove a package say postfix. What will you do?

Answer : First we need to know postfix was installed by what package. Find the package name that installed postfix using options -e erase/uninstall a package) and –v (verbose output).

# rpm -qa postfix*


and then remove postfix as:

# rpm -ev postfix-2.10.1-6.el7.x86_64

Preparing packages...
5. Get detailed information about an installed package, means information like Version, Release, Install Date, Size, Summary and a brief description.

Answer : We can get detailed information about an installed package by using option -qa with rpm followed by package name.

For example to find details of package openssh, all I need to do is:

# rpm -qa openssh

[[email protected] tecmint]# rpm -qi openssh
Name        : openssh
Version     : 6.8p1
Release     : 5.fc22
Architecture: x86_64
Install Date: Thursday 28 May 2015 12:34:50 PM IST
Group       : Applications/Internet
Size        : 1542057
License     : BSD
Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

9 Responses

  1. Aakash says:

    Shilpa Nair Excellent job

  2. Abhay Singh says:


    is any one has idea about why some time use same priority in MX for example google MX record

    Priority Mail Server
    Thank You

  3. vishnu sharma says:

    wow very nice interview, this is very helpful for me..

  4. Prashant Singh says:

    One of the Excellent Team work ………….
    @Shilpa : Perfecto Amiga :) (y)

  5. Sumit Sharma says:

    I am also a trainee Linux geek but unable to find this kind of jobs in Delhi and NCR area, all companies hire for minimum 2 year of experience. Can. You help me to come out this situation?

  6. Mohamed Magdy says:

    Thanks for the info.

    There’s a typo in question #5. It’s qi not qa.

  7. satish says:

    Thanks Shilpa for sharing . All the best.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.