Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management

11. How will you list all the enabled repolist on a system.

Answer : We can list all the enabled repos on a system simply using following commands.

# yum repolist
or
# dnf repolist

Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015.
repo id                                                                           repo name                                                                                             status
*fedora                                                                           Fedora 22 - x86_64                                                                                    44,762
ozonos                                                                            Repository for Ozon OS                                                                                    61
*updates                                                                          Fedora 22 - x86_64 - Updates   

The above command will only list those repos that are enabled. If we need to list all the repos, enabled or not, we can do.

# yum repolist all
or
# dnf repolist all

Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015.
repo id                                                                         repo name                                                                                      status
*fedora                                                                         Fedora 22 - x86_64                                                                             enabled: 44,762
fedora-debuginfo                                                                Fedora 22 - x86_64 - Debug                                                                     disabled
fedora-source                                                                   Fedora 22 - Source                                                                             disabled
ozonos                                                                          Repository for Ozon OS                                                                         enabled:     61
*updates                                                                        Fedora 22 - x86_64 - Updates                                                                   enabled:  5,018
updates-debuginfo                                                               Fedora 22 - x86_64 - Updates - Debug
12. How will you list all the available and installed packages on a system?

Answer : To list all the available packages on a system, we can do:

# yum list available
or
# dnf list available

ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015.
Available Packages
0ad.x86_64                               0.0.18-1.fc22                   fedora 
0ad-data.noarch                          0.0.18-1.fc22                   fedora 
0install.x86_64                          2.6.1-2.fc21                    fedora 
0xFFFF.x86_64                            0.3.9-11.fc22                   fedora 
2048-cli.x86_64                          0.9-4.git20141214.723738c.fc22  fedora 
2048-cli-nocurses.x86_64                 0.9-4.git20141214.723738c.fc22  fedora 
....

To list all the installed Packages on a system, we can do.

# yum list installed
or
# dnf list installed

Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015.
Installed Packages
GeoIP.x86_64                            1.6.5-1.fc22                     @System
GeoIP-GeoLite-data.noarch               2015.05-1.fc22                   @System
NetworkManager.x86_64                   1:1.0.2-1.fc22                   @System
NetworkManager-libnm.x86_64             1:1.0.2-1.fc22                   @System
aajohan-comfortaa-fonts.noarch          2.004-4.fc22                     @System
....

To list all the available and installed packages on a system, we can do.

# yum list
or
# dnf list

Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015.
Installed Packages
GeoIP.x86_64                             1.6.5-1.fc22                    @System
GeoIP-GeoLite-data.noarch                2015.05-1.fc22                  @System
NetworkManager.x86_64                    1:1.0.2-1.fc22                  @System
NetworkManager-libnm.x86_64              1:1.0.2-1.fc22                  @System
aajohan-comfortaa-fonts.noarch           2.004-4.fc22                    @System
acl.x86_64                               2.2.52-7.fc22                   @System
....
13. How will you install and update a package and a group of packages separately on a system using YUM/DNF?

Answer : To Install a package (say nano), we can do,

# yum install nano

To Install a Group of Package (say Haskell), we can do.

# yum groupinstall 'haskell'

To update a package (say nano), we can do.

# yum update nano

To update a Group of Package (say Haskell), we can do.

# yum groupupdate 'haskell'
14. How will you SYNC all the installed packages on a system to stable release?

Answer : We can sync all the packages on a system (say CentOS or Fedora) to stable release as,

# yum distro-sync      [On CentOS/RHEL]
or
# dnf distro-sync      [On Fedora 20 Onwards]

Seems you have done a good homework before coming for the interview,Good!. Before proceeding further I just want to ask one more question.

15. Are you familiar with YUM local repository? Have you tried making a Local YUM repository? Let me know in brief what you will do to create a local YUM repo.

Answer : First I would like to Thank you Sir for appreciation. Coming to question, I must admit that I am quiet familiar with Local YUM repositories and I have already implemented it for testing purpose in my local machine.

1. To set up Local YUM repository, we need to install the below three packages as:

# yum install deltarpm  python-deltarpm  createrepo

2. Create a directory (say /home/$USER/rpm) and copy all the RPMs from RedHat/CentOS DVD to that folder.

# mkdir /home/$USER/rpm
# cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm

3. Create base repository headers as.

# createrepo -v /home/$USER/rpm

4. Create the .repo file (say abc.repo) at the location /etc/yum.repos.d simply as:

cd /etc/yum.repos.d && cat << EOF > abc.repo
[local-installation]name=yum-local
baseurl=file:///home/$USER/rpm
enabled=1
gpgcheck=0
EOF

Important: Make sure to remove $USER with user_name.

That’s all we need to do to create a Local YUM repository. We can now install applications from here, that is relatively fast, secure and most important don’t need an Internet connection.

Okay! It was nice interviewing you. I am done. I am going to suggest your name to HR. You are a young and brilliant candidate we would like to have in our organization. If you have any question you may ask me.

Me: Sir, it was really a very nice interview and I feel very lucky today, to have cracked the interview..

Obviously it didn’t end here. I asked a lots of questions like the project they are handling. What would be my role and responsibility and blah..blah..blah

Friends, by the time all these were documented I have been called for HR round which is 3 days from now. Hope I do my best there as well. All your blessings will count.

Thankyou friends and Tecmint for taking time and documenting my experience. Mates I believe Tecmint is doing some really extra-ordinary which must be praised. When we share ours experience with other, other get to know many things from us and we get to know our mistakes.

It enhances our confidence level. If you have given any such interview recently, don’t keep it to yourself. Spread it! Let all of us know that. You may use the below form to share your experience with us.

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.

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

You may also like...

10 Responses

  1. Harendra Kumar says:

    This is a good job and thanks for share your experience .

  2. Aakash says:

    Shilpa Nair Excellent job

  3. Abhay Singh says:

    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

  4. vishnu sharma says:

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

  5. Prashant Singh says:

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

  6. 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?

  7. Mohamed Magdy says:

    Thanks for the info.

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

  8. 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.