Loading...
Linux Interview Questions

YUM & RPM

YUM (Yellowdog Updater, Modified)

1. What is YUM in Linux?
A) YUM is a package manager used in RHEL/CentOS/Fedora systems to install,
update, and manage software packages automatically with dependency resolution.

2. How do you install a package using YUM?
A)

yum install package-name

3. How do you remove a package with YUM?
A)

yum remove package-name

4. How do you update all system packages using YUM?
A)

yum update -y

5. How do you check if a package is already installed?
A)

yum list installed | grep package-name

 

6.How do you search for a package in YUM repositories?
A)

yum search package-name

7. How do you view package information before installing?
A)

yum info package-name

8. How do you install a package group in YUM?
A) yum groupinstall “Development Tools”

9. Where are YUM repositories configured?
A) In /etc/yum.repos.d/*.repo files.

10. How do you clear the YUM cache?
A)

yum clean all
yum makecache

(Red Hat Package Manager)

11. What is RPM in Linux?
A) RPM is a low-level package management tool for installing, removing, and querying .rpm files in RHEL-based systems.

12. How do you install a package with RPM?
A)

rpm -ivh package.rpm
  • i → install
  • v → verbose
  • h → hash progress

13. How do you upgrade an existing package using RPM?
A)

rpm -Uvh package.rpm

14. How do you remove a package using RPM?
A)

rpm -e package-name

15. How do you check if a package is installed with RPM?
A)

rpm -q package-name

16. How do you list all installed RPM packages?
A)

rpm -qa

17. How do you verify a package installation?
A)

rpm -V package-name

18. How do you check which package a file belongs to?
A)

rpm -qf /path/to/file

19. How do you get package details using RPM?
A)

rpm -qi package-name

20. What is the difference between YUM and RPM?
A)

  • RPM → Low-level tool, works with .rpm files directly, no dependency resolution.
  • YUM → High-level tool, uses RPM in the background, automatically resolves dependencies from repos.
Leave a Reply

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