この2つはRed Hat系のLinuxディストリビューションで使われている“RPMパッケージ”を扱うためのパッケージ管理コマンド。yumの後に生まれたのがdnf。
どちらも/usr/bin/dnf-3を呼び出しているため、基本的には一緒と捉えてよさそう
/usr/bin/dnf-3の実態はpythonスクリプト
▼redhat8.5で確認
[root@test-host ~]# more /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)
[root@test-host ~]# which yum
/usr/bin/yum
[root@test-host ~]# which dnf
/usr/bin/dnf
[root@test-host ~]# ls -l /usr/bin/yum /usr/bin/dnf
lrwxrwxrwx. 1 root root 5 9月 13 2021 /usr/bin/dnf -> dnf-3
lrwxrwxrwx. 1 root root 5 9月 13 2021 /usr/bin/yum -> dnf-3
[root@test-host ~]# ls -l /usr/bin/dnf-3
-rwxr-xr-x. 1 root root 1954 9月 13 2021 /usr/bin/dnf-3