Tutorial on DNF, the default package manager instead of YUM in CentOS 8

One of the new features of CentOS 8 is that the familiar package manager YUM has been replaced with DNF. The DNF manager has been used by the Fedora team since Fedora 22 but it has not been until now that the CentOS team has decided to use it. So is there a reason why the community moved from YUM to DNF? When using DNF, do users have to remember more familiar command syntax? All will be summarized in this article.

The reason that DNF was replaced for YUM.

Some of the main reasons that DNF is hailed as being smarter, more future than YUM are as follows:

  • YUM has been developed by the community and has been around for a long time, so in earlier times standardizing YUM API documents was a bit difficult or even worse. So if you want to continue developing, it will be very hard for DEV.

  • DNF supports both python2 and python3, while YUM does not solve this problem. In the future to 2020, python2 also has plans to support. So the move to DNF is a step towards the future.

  • YUM simply outdates (outdated) so it's natural for DNF or another form of replacement: D.

Is it difficult to use DNF?

The answer is NO, because the syntax of DNF inherits or in other words is exactly the same as when using YUM. Therefore users do not need to remember too much, just change yum with dnf is okay.

Note: on CentOS 8 you can still use yum to install packages as you currently know. The reason will be discussed below.

Package installation syntax using DNF

dnf install ten_goi


dnf install -y ten_goi

For example

Install packages using DNF

dnf install -y vim

dnf install -y httpd

The essence of the DNF package manager

In essence, the DNF package manager is linked to YUM in CentOS 8. It means you can still use the command. yum install ten_goi to install the necessary packages. We will check this out.

Check the path of the yum program with the which command

[root@centos8srv01 ~]# which yum

Check out the link of /usr/bin/yum

[root@centos8srv01 ~]# ll /usr/bin/yum
lrwxrwxrwx. 1 root root 5 May 14 02:34 /usr/bin/yum -> dnf-3

On the above result, we see the nature /usr/bin/yum

is the link from the dnf3 file

Continue to check the path of the dnf package with the which command

 [root@centos8srv01 ~]# which dnf

And check out the link of /usr/bin/dnf, we have the below result.

[root@centos8srv01 ~]# ll /usr/bin/dnf
lrwxrwxrwx. 1 root root 5 May 14 02:34 /usr/bin/dnf -> dnf-3

Next check's path /usr/bin/dnf-3

[root@centos8srv01 ~]# ll /usr/bin/dnf-3
-rwxr-xr-x. 1 root root 1954 May 14 02:34 /usr/bin/dnf-3

The above result shows that dnf-3 has no link to any file. This is the original file for the dnf and yum commands.

We can check the other paths of the files related to the yum package

[root@centos8srv01 ~]# ll /etc/yum.conf
lrwxrwxrwx. 1 root root 12 May 14 02:34 /etc/yum.conf -> dnf/dnf.conf


Thus, in the future you should gradually switch to using dnfth instead of yum, as yum is currently being linked to dnf.



seo marketing wordpress seo seo hosting seo and marketing word press seo wordpress and seo wordpress marketing hosting seo seo press pro market seo seo & marketing seo e marketing e marketing seo seo pro wordpress marketing & seo seo di wordpress wordpress seo host hosting and seo wordpress hosting seo wordpress seo wordpress wordpress for marketing seo press wordpress marketing for seo