Lesson 16 / 29

yum & dnf

The RHEL/Fedora side of package management.

apt vs yum/dnf

Fedora, RHEL and CentOS use dnf (the modern replacement for yum) instead of apt. The commands map closely — same idea, different name.

dnf basics

The everyday operations mirror apt closely.

sudo dnf install htop      # install
sudo dnf remove htop       # remove
sudo dnf update            # update all packages
# legacy systems: same commands with 'yum' instead of 'dnf'

Quick check: Which package manager is standard on Ubuntu?

  • dnf
  • apt
  • pacman
Answer

apt — Ubuntu is Debian-based and uses apt; dnf is for Fedora/RHEL, pacman for Arch.