1
00:00:06,639 --> 00:00:09,300
In this video, we'll explore
Yum DNF on Red Hat.

2
00:00:10,060 --> 00:00:14,189
So how does it work? Well, Yum is
used in older versions of Red Hat and Family.

3
00:00:15,150 --> 00:00:17,629
Recently the Yum backend
has been replaced with dnf.

4
00:00:19,609 --> 00:00:25,280
DNF is a preferred tool in current RHEL versions,
and with the release of RHEL 10, a new

5
00:00:25,280 --> 00:00:30,950
version of DNF has been introduced which is no
longer backward compatible to the older versions of Yum.

6
00:00:31,649 --> 00:00:35,909
So where in RHEL 9 and related
you could use Yum if you wanted

7
00:00:35,909 --> 00:00:40,170
to. In RHEL 10 and related,
it really becomes important to use DNF.

8
00:00:41,210 --> 00:00:45,150
DNF uses repositories that are
in etc Yum Repos D

9
00:00:45,150 --> 00:00:49,090
and the DNF command
was written to be intuitive.

10
00:00:49,950 --> 00:00:56,745
You use commands like dnf install, dnf search,
and dnfremove. That kind of speaks for itself in

11
00:00:56,745 --> 00:01:03,540
dnf. You can also work with package groups
and that makes installation of specific functionality easier.

12
00:01:04,420 --> 00:01:10,120
Use DNF groups list for an overview and
DNF groups install to install a specific group.

13
00:01:11,000 --> 00:01:17,469
While working with dnf, finding the right package may
be a challenge, but there's DNF provides to fix that.

14
00:01:17,969 --> 00:01:24,254
Use DNF provides SELinux to look for packages that
contain a file with the name selinux and replace

15
00:01:24,254 --> 00:01:30,539
that with any file name if you are
looking for a package that contains a specific file.

16
00:01:31,939 --> 00:01:37,579
And also the dnf history command is
convenient to undo changes after installing packages.

17
00:01:38,959 --> 00:01:40,980
Let me demonstrate how
to work with dnf.

18
00:01:42,540 --> 00:01:47,069
So first some basics.
Sudo dnf certs zsh Some

19
00:01:47,069 --> 00:01:51,599
people like zsh. It's
a powerful interactive shell.

20
00:01:52,420 --> 00:01:58,500
So if you think you like that,
then you can use sudo dnf install zsh.

21
00:02:00,980 --> 00:02:05,766
Then you need to press yes to install
it. You can also use dnf install y.

22
00:02:05,766 --> 00:02:10,553
Then it doesn't wait for you to confirm
that you really want to install. But I

23
00:02:10,553 --> 00:02:15,340
like having an overview so that you
know that it's going in the right direction.

24
00:02:16,379 --> 00:02:18,580
I also
like DNF list.

25
00:02:19,189 --> 00:02:23,569
So DNF list SELinux,
for instance, is listing all

26
00:02:23,569 --> 00:02:27,949
packages that have a
name starting with Selinux.

27
00:02:29,710 --> 00:02:33,449
And what do we have
here? Well, we have a list

28
00:02:33,449 --> 00:02:37,189
of installed packages and maybe
even more interesting available packages.

29
00:02:37,689 --> 00:02:41,479
And these available packages are packages
that, well, have not been installed.

30
00:02:42,060 --> 00:02:46,439
And you know why this is
convenient? Sometimes you think, oh, I need

31
00:02:46,439 --> 00:02:50,819
this functionality that relates to whatever
Selinux in this case maybe HTTP.

32
00:02:52,370 --> 00:02:57,540
Then you use DNF list SELinux or
HTTP and you see all the packages

33
00:02:57,540 --> 00:03:02,710
starting with and in many cases that
is quite as powerful as DNF certs.

34
00:03:04,530 --> 00:03:10,219
Now let me use a sudo
DNF update which is doing what?

35
00:03:10,740 --> 00:03:16,355
Well, that is going to check if any updates
are available and oh boy, I can see many updates

36
00:03:16,355 --> 00:03:21,970
are available. Do I want to install that right
now? No, I don't. So let's get out of here.

37
00:03:22,750 --> 00:03:27,509
I'm going to do that at a later time. Maybe this
is something that I want to schedule in a cron job.

38
00:03:28,229 --> 00:03:31,954
In DNF we also
have DNF groups. So sudo

39
00:03:31,954 --> 00:03:35,680
DNF groups list is
showing all the DNF groups.

40
00:03:36,360 --> 00:03:43,289
And if you want to implement specific functionality,
you can do that by installing the entire group.

41
00:03:43,849 --> 00:03:47,789
Like sudo DNF
groups installed container.

42
00:03:49,300 --> 00:03:51,500
Container
management.

43
00:03:52,099 --> 00:03:58,373
Do you think this is going to be all right?
No, it's not, because there's space in the group name

44
00:03:58,373 --> 00:04:04,646
and in Linux if there is spaces, that can lead
to interpretation problems. So just to make sure, put everything

45
00:04:04,646 --> 00:04:10,919
between double quotes and that will install all the
packages in that specific group. And is that okay?

46
00:04:11,060 --> 00:04:11,900
Yeah, that
is okay.

47
00:04:12,979 --> 00:04:17,079
Oh, and look at that. I didn't
even see it. It didn't install. It upgraded.

48
00:04:17,519 --> 00:04:21,404
So in the group we had two
packages, Podman and Builder. And apparently a

49
00:04:21,404 --> 00:04:25,289
newer version was available and now
I have access to the newer version.

50
00:04:26,389 --> 00:04:32,829
Last thing I want to show you is sudo DNF
repo list which is listing the repositories on your system.

51
00:04:33,529 --> 00:04:39,129
And behind these repositories there is
configuration. Let me show you. Etc. Yum.

52
00:04:39,750 --> 00:04:46,379
Repos D
CentOS Repo.

53
00:04:47,019 --> 00:04:52,339
That's a CentOS repository that was
provided while I installed the CentOS system.

54
00:04:53,019 --> 00:04:58,024
We don't care about the details too much,
it's just working. You may notice that every

55
00:04:58,024 --> 00:05:03,029
now and then if you want to install
additional software, you need access to additional repositories.

56
00:05:03,550 --> 00:05:08,509
That's specifically happening when you work with
software that is provided by some external vendors.
