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.

Avishek
A Passionate GNU/Linux Enthusiast and Software Developer with over a decade in the field of Linux and Open Source technologies.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

14 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

Leave a Reply to Aakash Cancel reply

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.