RH124 Ch 14: Installing Software with dnf and Flatpak

RPM and dnf: software arrives as RPM packages from repositories. rpm queries what is installed; dnf resolves dependencies and talks to repositories. - dnf search word, dnf info pkg, dnf install pkg, dnf remove pkg, dnf update. - dnf provides /usr/bin/gpasswd — which package ships a file; rpm -qf /path for installed files. - rpm -qa, rpm -ql pkg (files), rpm -qc pkg (config files), dnf history (undo with dnf history undo N). - Groups: dnf group list, dnf group install "Group Name". Modules/AppStreams provide alternative versions.

Repositories are .repo files in /etc/yum.repos.d/: [webasha] name=WebAsha tools baseurl=file:///opt/webasha-repo or http(s)://… enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webasha dnf config-manager addrepo --set=baseurl=URL writes one for you. dnf repolist confirms it; gpgcheck=0 only for unsigned internal test repos. On a registered RHEL system, subscription-manager provides the Red Hat repos.

Flatpak (new on the RHEL 10 exam) installs desktop apps with their own runtime, isolated from the system: - flatpak remotes, flatpak remote-add --if-not-exists name URL-or-file.flatpakrepo, flatpak remote-delete name. - flatpak remote-ls name, flatpak search word, flatpak install name app.id, flatpak list, flatpak update, flatpak uninstall app.id, flatpak uninstall --unused. - Installs are system-wide by default (--system); --user puts them in your home.

Exam traps: typos in baseurl (test with dnf repolist), forgetting enabled=1, and installing a Flatpak per-user when the task says system-wide.