Fedora made the change to DNF back with Fedora 22, but CentOS and RHEL have stayed with YUM, until now. RHEL has jumped to the next gen package manager, and that's a good thing, but if you're missing YUM or have scripts that rely on it, you'll still have access to the old package manager. What's even better, you don't need to do anything extra.In this tutorial you will learn:
- How to Use YUM on RHEL 8 / CentOS 8
- What is YUM on RHEL 8 / CentOS 8, Really
- Is there a Difference?
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||RHEL 8 / CentOS 8|
|Other||Privileged access to your Linux system as root or via the |
|Conventions|| # - requires given linux commands to be executed with root privileges either directly as a root user or by use of |
How to Use YUM on RHEL 8 / CentOS 8
Open a terminal on your RHEL 8 / CentOS 8 system, and run the following command.
# yum update
It worked, didn't it? Try installing something with YUM, like you would on a RHEL 7 system.
# yum install php
BLUE SKY STUDIOS are looking for Linux Administrator to maintain and support the Studio's 450+ production Linux workstations, including daily interactions with the Studio’s digital animation artists.
LOCATION: Greenwich, Connecticut, USA
It's the same. Go ahead and try a few more commands. They should all behave exactly like on RHEL 7. Here's the catch; YUM isn't installed on RHEL 8 / CentOS 8. In fact, there isn't even a package available for it. So, what's going on?
What is YUM on RHEL 8 / CentOS 8 Really
Red Hat have been making server operating systems long enough that change can go over like a lead balloon. So, they've done two things to ease the transition to DNF. First, they created a wrapper script to take the place of YUM and pass everything along to DNF. Take a look at the YUM executable to see what it's about.
$ cat /usr/bin/yum
That's all fairly straightforward, but why does it work so well? That has everything to do with DNF itself.
Is there a Difference?
The differences between DNF and YUM are mostly technical and exist below the surface. DNF was built to be backward compatible with YUM on the surface level. Syntactically, they're nearly identical. In reality, DNF is just a new iteration of YUM with better dependency resolution, speed improvements, and better memory usage.
It's entirely up to you. You can keep on using the
yum command, or you can switch right over to
dnf. There's no need to change scripts right yet, and you can take your time acclimating.
There you have it! YUM already is installed on RHEL 8, sort of. You don't need to do anything new, if you don't want to. Switching to DNF to install packages is really simple, though, so try it out.