Package Manager Simulator

Master APT and YUM/DNF Package Management | House of Script

Quick Actions (APT)

user@debian:~$
user@debian:~$

Available Packages

Quick Actions (YUM/DNF)

user@fedora:~$
user@fedora:~$

Available Packages

APT vs YUM/DNF Command Comparison

Action APT (Debian/Ubuntu) YUM (RHEL/CentOS) DNF (Fedora)
Update package list apt update yum check-update dnf check-update
Install package apt install package yum install package dnf install package
Remove package apt remove package yum remove package dnf remove package
Upgrade all packages apt upgrade yum update dnf upgrade
Search for package apt search keyword yum search keyword dnf search keyword
Show package info apt show package yum info package dnf info package
List installed packages apt list --installed yum list installed dnf list installed
Remove unused dependencies apt autoremove yum autoremove dnf autoremove
Clean package cache apt clean yum clean all dnf clean all
Download package without installing apt download package yumdownloader package dnf download package

APT Repository Configuration

/etc/apt/sources.list
# Debian/Ubuntu APT repository sources # Format: deb [arch] repository_url distribution component # Main repositories deb http://archive.ubuntu.com/ubuntu/ jammy main restricted deb http://archive.ubuntu.com/ubuntu/ jammy universe multiverse # Security updates deb http://security.ubuntu.com/ubuntu jammy-security main restricted deb http://security.ubuntu.com/ubuntu jammy-security universe multiverse # Updates deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted deb http://archive.ubuntu.com/ubuntu/ jammy-updates universe multiverse # Source repositories (commented out) # deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
Key Components:
main - Officially supported open source software
restricted - Proprietary drivers for devices
universe - Community-maintained open source software
multiverse - Software restricted by copyright or legal issues

Managing Repositories:
add-apt-repository ppa:user/ppa-name - Add PPA
apt-key add keyfile - Add repository key
apt update - Refresh package lists from repositories

YUM/DNF Repository Configuration

/etc/yum.repos.d/fedora.repo
# Fedora YUM/DNF repository configuration # Format: INI-style configuration file [fedora] name=Fedora $releasever - $basearch #baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 countme=1 metadata_expire=7d repo_gpgcheck=0 type=rpm gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False [fedora-updates] name=Fedora $releasever - $basearch - Updates #baseurl=http://download.example/pub/fedora/linux/updates/$releasever/Everything/$basearch/ metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 repo_gpgcheck=0 type=rpm gpgcheck=1 metadata_expire=6h gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False
Key Directives:
name - Human-readable repository name
baseurl/metalink - Repository URL location
enabled - Enable (1) or disable (0) the repository
gpgcheck - Verify package signatures (1=yes, 0=no)
gpgkey - Location of GPG key for verification

Managing Repositories:
yum repolist - List enabled repositories
yum-config-manager --add-repo url - Add repository
dnf config-manager --set-enabled repo - Enable repository
Score: 0 / 0
Course Home