Objectives
What the exam tests
- Install and update software packages from Red Hat Network, a remote repository, or from the local file system
- Work with package module streams to install a specific version of a software package
- Modify the system bootloader
- Configure a system to use time services (chrony)
- Install and update software packages from Red Hat Network
- Enable and disable system services
- Query and verify installed RPM packages
- Create and configure file systems — covered separately in storage domain
On RHEL 9 the primary package tool is DNF (Dandified YUM). The yum command still works as a compatibility alias, but exam tasks may use either name.
Coverage weight by topic
Package management flow overview
Most exam software tasks follow this pattern: configure or verify a repo, install a package, then enable and start the associated service.
DNF and YUM commands
DNF — installing and removing packages
DNF — updating packages
On the exam, dnf update and dnf upgrade are equivalent. The --security flag is tested in patching scenarios.
DNF — searching and querying
dnf provides is extremely useful on the exam when you need to find which package installs a specific file or binary.
DNF common options and flags
| Option | Effect |
|---|---|
-y | Assume yes to all prompts — non-interactive |
--nogpgcheck | Skip GPG signature verification (use with caution) |
--disablerepo=* | Disable all repos for this transaction |
--enablerepo=name | Enable a specific disabled repo for this transaction |
--downloadonly | Download RPMs without installing |
--security | Limit operations to security-relevant packages |
-q | Quiet mode — suppress progress output |
--setopt= | Override a configuration option inline |
Repository configuration
Repository file structure
Repository definitions live in /etc/yum.repos.d/ as .repo files. Each file can contain one or more [repoid] sections.
| Key | Required | Description |
|---|---|---|
name | Yes | Human-readable name shown in listings |
baseurl | Yes* | HTTP/FTP/file URL to repo root. Use mirrorlist instead if using a mirror list. |
enabled | No | 1 = active, 0 = disabled (default 1) |
gpgcheck | No | 1 = verify package signatures (recommended) |
gpgkey | No | Path or URL to GPG public key file |
mirrorlist | No | URL returning a list of mirror URLs (alternative to baseurl) |
Managing repositories with dnf config-manager
On exam day you are often given a repo URL or ISO path and asked to configure it. Use dnf config-manager --add-repo or create a .repo file manually — both are accepted.
Configuring a local ISO as a repository
Setting gpgcheck=0 is acceptable for local ISOs on the exam. For production systems, always enable GPG verification.
GPG key management
RPM package management
RPM — querying installed packages
rpm -qf /path/to/file is one of the most useful exam commands — it tells you exactly which package a file belongs to.
RPM — verifying package integrity
RPM — installing local packages
Use dnf install package.rpm rather than bare rpm -i whenever possible — DNF automatically resolves and installs any missing dependencies.
RPM package naming convention
Application streams and modules
What are AppStream modules?
RHEL 9 ships two main repositories: BaseOS (core OS packages with long-term stability) and AppStream (user-space applications in multiple versioned streams). Modules allow you to install a specific version of an application — for example PHP 8.1 instead of the default — without replacing system packages.
BaseOS
- Core OS components
- Traditional RPM packaging
- Long support lifecycle
- Consistent throughout RHEL lifecycle
AppStream
- User-space applications
- Multiple versions via modules
- Shorter update cadence
- Enable specific stream per app
DNF module commands
Module stream notation is module:stream/profile. If you only specify module:stream, DNF uses the default profile.
Module concepts explained
| Concept | Definition | Example |
|---|---|---|
| Module | A logical grouping of related packages for an application | php, nodejs, postgresql |
| Stream | A specific version branch of the module | php:8.1, nodejs:18 |
| Profile | A predefined set of packages within a stream | common, devel, minimal |
| Default stream | The version enabled if you install without specifying a stream | Varies by module |
| Active stream | The currently enabled stream on the system | Shown as [e] in module list |
Module list output — reading the table
Switching module streams — full workflow
You cannot have two streams of the same module active simultaneously. Always reset before switching.
Cheat sheet
Most-tested commands — quick reference
dnf install httpd -ydnf remove httpd -ydnf update -ydnf search keyworddnf info httpddnf provides /bin/filednf install ./pkg.rpmdnf repolist alldnf config-manager --enable namednf config-manager --add-repo URLrpm -q httpdrpm -qarpm -ql httpdrpm -qf /path/to/filerpm -V httpddnf module listdnf module enable php:8.1dnf module install php:8.1dnf module reset phprpm --import /path/to/keydnf historydnf history undo lastrpm -qc httpddnf group install "Dev Tools"RPM query flags — quick reference
| Flag | What it shows | Common combo |
|---|---|---|
-q | Query (required base flag) | rpm -q httpd |
-a | All installed packages | rpm -qa |
-i | Package info / metadata | rpm -qi httpd |
-l | List all installed files | rpm -ql httpd |
-c | Configuration files only | rpm -qc httpd |
-d | Documentation files only | rpm -qd httpd |
-f | Which package owns this file | rpm -qf /etc/hosts |
-p | Query a local .rpm file (not installed) | rpm -qip pkg.rpm |
-V | Verify integrity against RPM database | rpm -V httpd |
--scripts | Show pre/post install scripts | rpm -q --scripts httpd |
Repo file — minimal working example
For exam tasks, this minimal structure is sufficient. Add gpgkey= if GPG verification is required.
Practice quiz
Question 1 of 7
Which command finds which installed package provides the file /usr/bin/htpasswd?
rpm -qf /path/to/file queries which installed package owns that specific file. The -f flag means "file". dnf provides also works but searches all repos, not just installed packages.Question 2 of 7
You need to configure a local DVD ISO mounted at /mnt/dvd as a DNF repository. Which file should you create?
/etc/yum.repos.d/ as .repo files. For a DVD with BaseOS and AppStream, create two [section] blocks pointing to file:///mnt/dvd/BaseOS and file:///mnt/dvd/AppStream. Option A edits global DNF config, not a repo definition. Option C is Debian/Ubuntu syntax.Question 3 of 7
Which command installs PHP version 8.1 from the AppStream module?
dnf module install php:8.1 enables the stream and installs its default profile in one step. Option A would look for a package literally named "php-8.1" (likely not found). Option C has incorrect syntax (should use colon: php:8.1). Option D is not a valid DNF subcommand.Question 4 of 7
After running rpm -V sshd, the output shows S.5....T. /etc/ssh/sshd_config. What does the 5 indicate?
rpm -V output, 5 means the MD5 checksum differs (file content has changed). S = file size changed, M = mode/permissions changed, T = modification time changed. A dot (.) means that test passed. This is expected for configuration files that have been legitimately edited.Question 5 of 7
You want to disable the rhel-9-appstream repository permanently. Which command does this?
dnf config-manager --disable name sets enabled=0 in the repo's .repo file, making the change persistent across reboots. Option A only disables for that single command invocation. Option C deletes the file entirely (too destructive — you lose all config). Option D is for module streams, not repositories.Question 6 of 7
Which command lists only the configuration files installed by the sshd package?
rpm -qc package lists only the configuration files tagged in the RPM spec (files typically under /etc). -ql lists all files, -qi shows package metadata, and dnf info shows repository metadata — not installed file lists.Question 7 of 7
You installed the wrong stream for a module and need to switch. What is the correct first step before enabling a different stream?
dnf module remove <module> → dnf module reset <module> → dnf module enable module:newstream → dnf module install module:newstream. You must reset before enabling a different stream — attempting to enable a new stream directly while another is active will produce an error. Option D is technically possible but risky and not the intended method.