Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management

6. You are not sure about what are the configuration files provided by a specific package say httpd. How will you find list of all the configuration files provided by httpd and their location.

Answer : We need to run option -c followed by package name with rpm command and it will list the name of all the configuration file and their location.

# rpm -qc httpd

/etc/httpd/conf.d/autoindex.conf
/etc/httpd/conf.d/userdir.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf/httpd.conf
/etc/sysconfig/httpd

Similarly we can list all the associated document files as:

# rpm -qd httpd

/usr/share/doc/httpd/ABOUT_APACHE
/usr/share/doc/httpd/CHANGES
/usr/share/doc/httpd/LICENSE
...

also, we can list the associated License file as:

# rpm -qL openssh

/usr/share/licenses/openssh/LICENCE

Not to mention that the option -d and option -L in the above command stands for ‘documents‘ and ‘License‘, respectively.

7. You came across a configuration file located at ‘/usr/share/alsa/cards/AACI.conf’ and you are not sure this configuration file is associated with what package. How will you find out the parent package name?

Answer : When a package is installed, the relevant information gets stored in the database. So it is easy to trace what provides the above package using option -qf (-f query packages owning files).

# rpm -qf /usr/share/alsa/cards/AACI.conf
alsa-lib-1.0.28-2.el7.x86_64

Similarly we can find (what provides) information about any sub-packge, document files and License files.

8. How will you find list of recently installed software’s using rpm?

Answer : As said earlier, everything being installed is logged in database. So it is not difficult to query the rpm database and find the list of recently installed software’s.

We can do this by running the below commands using option –last (prints the most recent installed software’s).

# rpm -qa --last

The above command will print all the packages installed in a order such that, the last installed software appears at the top.

If our concern is to find out specific package, we can grep that package (say sqlite) from the list, simply as:

# rpm -qa --last | grep -i sqlite

sqlite-3.8.10.2-1.fc22.x86_64                 Thursday 18 June 2015 05:05:43 PM IST

We can also get a list of 10 most recently installed software simply as:

# rpm -qa --last | head

We can refine the result to output a more custom result simply as:

# rpm -qa --last | head -n 2

In the above command -n represents number followed by a numeric value. The above command prints a list of 2 most recent installed software.

9. Before installing a package, you are supposed to check its dependencies. What will you do?

Answer : To check the dependencies of a rpm package (XYZ.rpm), we can use switches -q (query package), -p (query a package file) and -R (Requires / List packages on which this package depends i.e., dependencies).

# rpm -qpR gedit-3.16.1-1.fc22.i686.rpm 

/bin/sh
/usr/bin/env
glib2(x86-32) >= 2.40.0
gsettings-desktop-schemas
gtk3(x86-32) >= 3.16
gtksourceview3(x86-32) >= 3.16
gvfs
libX11.so.6
...
10. Is rpm a front-end Package Management Tool?

Answer : No! rpm is a back-end package management for RPM based Linux Distribution.

YUM which stands for Yellowdog Updater Modified is the front-end for rpm. YUM automates the overall process of resolving dependencies and everything else.

Very recently DNF (Dandified YUM) replaced YUM in Fedora 22. Though YUM is still available to be used in RHEL and CentOS, we can install dnf and use it alongside of YUM. DNF is said to have a lots of improvement over YUM.

Good to know, you keep yourself updated. Lets move to the front-end part.

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

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

13 thoughts on “Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management”

  1. Hi,

    Very nice job.

    About question #1, sometimes we don’t know the exact name of the package.

    For that reason, I would use ‘grep‘ command. like:

    # rpm -qa | grep -i nano
    

    Let’s say if there is a package names ‘gnaao’, ‘Nano’ or ‘nano-7.2’ we will know about it.

    Thank you

    Reply
  2. hi

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

    Priority Mail Server
    5 ALT1.ASPMX.L.GOOGLE.COM.
    5 ALT2.ASPMX.L.GOOGLE.COM.
    Thank You

    Reply
    • I think its too late If you have not yet find the answer.

      By using multiple MX records with the same preference (ie 5) will provide some load balancing

      Reply
  3. 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?

    Reply

Got something to say? Join the discussion.

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