# yum & dnf — Linux

Source: https://www.geekswithgeeks.com/en/linux/linux-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.

```bash
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'
```

**Quiz:** Which package manager is standard on Ubuntu?

- [ ] dnf
- [x] apt
- [ ] pacman

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