0

Does anyone know what's the difference between the below command in CentOS Linux ?:

dnf update
yum update

Which one is better to use with Cron as automated OS update?

Thanks in advance.

2

yum was replaced with dnf in CentOS 8. The command yum still exists because people will still remember it for years to come. The only thing it does is to call dnf.

[root@localhost ~]# ls -l /usr/bin/yum
lrwxrwxrwx. 1 root root 5 Jul 21 18:46 /usr/bin/yum -> dnf-3
[root@localhost ~]# file /usr/bin/yum
/usr/bin/yum: symbolic link to dnf-3
| improve this answer | |
  • Hi Mike, so in this case, it would be better to use dnf-3 command? – Senior Systems Engineer Aug 27 at 2:07
  • @SeniorSystemsEngineer You should use dnf, this is the canonical command. Here dnf-3 means only that it is the version for Python 3. There was a Python 2 version early on that was named dnf-2 but it was obsoleted before RHEL 8 release. – Michael Hampton Aug 27 at 2:14
  • that's great, many thanks Mike ! – Senior Systems Engineer Aug 27 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.