Question 200
A RHEL 10 operator analyzes log /var/log/app19.log and needs to show matching lines and their original file line numbers. A review considers `grep -c "warning" /var/log/app19.log` as an alternative. Its relevant behavior is: -c prints the number of matching lines rather than their text. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- grep -i "warning" /var/log/app19.log
- grep -c "warning" /var/log/app19.log
- grep -v "warning" /var/log/app19.log
- grep -n "warning" /var/log/app19.log
Explanation
Correct Answer
D:-n prints each matching line prefixed by its line number. This matches the stated requirement to show matching lines and their original file line numbers. By contrast, the plausible alternative `grep -i "warning" /var/log/app19.log` has the effect: -i makes the text match case-insensitive; that operation would not achieve the requested result.
Incorrect Answers
A:-i makes the text match case-insensitive. The stated task is to show matching lines and their original file line numbers. Instead, `grep -n "warning" /var/log/app19.log` is the relevant alternative because -n prints each matching line prefixed by its line number.
B:-c prints the number of matching lines rather than their text. The stated task is to show matching lines and their original file line numbers. Instead, `grep -n "warning" /var/log/app19.log` is the relevant alternative because -n prints each matching line prefixed by its line number.
C:-v inverts the match, showing nonmatching lines. The stated task is to show matching lines and their original file line numbers. Instead, `grep -n "warning" /var/log/app19.log` is the relevant alternative because -n prints each matching line prefixed by its line number.
Question 201
The operator knows a utility’s purpose but not its RPM name. The keyword is `packet monitor`, and they need a search by package name or summary before installing anything. Which DNF operation fits?
- dnf search "packet monitor"
- dnf install "packet monitor"
- dnf remove "packet monitor"
- dnf repolist
Explanation
Correct Answer
A:DNF search looks for package names and summaries associated with a term, enabling discovery without changing the installed package set.
Incorrect Answers
B:Install expects package specifications and attempts an installation, but no actual RPM name has been identified.
C:Remove would modify the installed package set and cannot discover the unknown utility.
D:Repolist lists enabled repositories, not software packages matching a descriptive keyword.
Question 202
A package’s short summary does not mention `tokenize`, but its long description might. Which DNF search form includes descriptions beyond the default name and summary?
- dnf search tokenize
- dnf search --all tokenize
- dnf list --installed tokenize
- dnf remove tokenize
Explanation
Correct Answer
B:The --all search form includes longer package descriptions, so it can find a concept absent from name and short summary.
Incorrect Answers
A:A normal search is narrower and can miss a term found only in a long package description.
C:Installed-package listing tests installation presence, not description-wide discovery in enabled repositories.
D:Removal changes installed software and does not search metadata for the descriptive term.
Question 203
A RHEL 10 host needs a shared library providing `libfoo.so.1`, but the administrator does not know its RPM package name. Which DNF query searches file providers?
- dnf info libfoo.so.1
- dnf list --installed
- dnf provides "*/libfoo.so.1"
- dnf check-update
Explanation
Correct Answer
C:The provides query asks which package owns or supplies the matching file path; the quoted */ glob avoids guessing the unknown directory.
Incorrect Answers
A:Info expects a package identifier and does not perform a file-provider lookup from a filename alone.
B:This lists existing packages but cannot isolate the package providing that particular path without further evidence.
D:An update scan tests installed-package newer versions, not which package contains a given library.
Question 204
Before collecting a RHEL 10 software inventory, an auditor wants ONLY the RPMs currently installed locally, regardless of whether any enabled repository still offers them. Which read-only command meets this scope?
- dnf list --available
- dnf search audit
- dnf install audit
- dnf list --installed
Explanation
Correct Answer
D:The --installed filter reports installed RPM packages rather than the union of installed and repo-available software.
Incorrect Answers
A:Available lists installable repository content and can include items absent from this host.
B:Search by keyword is not an exhaustive list of installed software.
C:Installing a package mutates the machine and is not an inventory operation.
Question 205
A deployment engineer must identify packages exposed by the machine’s currently ENABLED repositories that are available to install, without mixing in already-installed-only packages. Which view is appropriate?
- dnf list --available
- dnf list --installed
- rpm -qa
- dnf remove --duplicates
Explanation
Correct Answer
A:This selects packages available from enabled repositories; it is not merely an inventory of the installed RPM database.
Incorrect Answers
B:Installed lists what is on the machine, including packages not available in current enabled repos.
C:rpm -qa reports installed RPM database entries, not candidates available from repos.
D:Removal affects local packages and cannot provide a repository candidate list.
Question 206
An administrator is evaluating the version, architecture, size, and description of a candidate RPM called `chrony` before approval. Which operation displays package metadata without installing it?
- dnf install chrony
- dnf info chrony
- dnf remove chrony
- dnf upgrade chrony
Explanation
Correct Answer
B:Info displays fields such as version, release, architecture, size and description for the named package, supporting a non-mutating review.
Incorrect Answers
A:Install changes the local package set instead of restricting the step to metadata review.
C:Remove could uninstall a running dependency and does not provide the requested candidate detail.
D:Upgrade modifies packages when newer versions are available; it is not a read-only details query.
Question 207
The security team obtained a vetted RPM at `/var/tmp/agent-2.0.rpm`. Repositories are enabled for its dependencies. What is the supported DNF invocation to install that local RPM file with dependency resolution?
- dnf search /var/tmp/agent-2.0.rpm
- dnf repolist --all
- dnf install /var/tmp/agent-2.0.rpm
- dnf check-update
Explanation
Correct Answer
C:DNF accepts an RPM file path and resolves dependencies from configured repositories when available, unlike a metadata query.
Incorrect Answers
A:Search interprets a term for package discovery and does not install the specified local RPM payload.
B:Repolist checks repository definitions rather than consuming the supplied RPM file.
D:Checking installed updates does not install a new package from the operator’s local file.
Question 208
A RHEL 10 administration workstation can reach its enabled repositories. It needs the `bind-utils` RPM and its declared dependencies installed, without downloading a manually selected standalone RPM first. Which command is appropriate?
- dnf search bind-utils
- dnf info bind-utils
- dnf remove bind-utils
- dnf install bind-utils
Explanation
Correct Answer
D:The install subcommand resolves the named RPM from enabled repositories and installs its required dependencies.
Incorrect Answers
A:Search locates matching package descriptions but does not perform any installation.
B:Info examines bind-utils package metadata, such as version and summary, but it does not resolve and install the RPM or its dependencies on this workstation.
C:Remove does the opposite lifecycle operation and can uninstall the package if already present.
Question 209
A verified DNF package group `System Tools` exists in the configured repositories. The administrator needs the group’s listed packages installed together, not just to see its description. Which command is designed for that?
- dnf group install "System Tools"
- dnf group info "System Tools"
- dnf group list
- dnf list --installed
Explanation
Correct Answer
A:Group install resolves the named group and installs its constituent package selection as a single managed operation.
Incorrect Answers
B:Group info lists the packages and categories in a group without actually installing them.
C:Group list inventories names and states; it is not a group installation request.
D:Installed listing cannot request a new package group to be added.
Question 210
A release manager needs a non-mutating list of pending upgrades for installed packages before opening the maintenance window. Which DNF command checks what updates are available?
- dnf upgrade
- dnf check-update
- dnf install rsyslog
- dnf group remove "System Tools"
Explanation
Correct Answer
B:Check-update queries for newer versions available for installed packages without executing the upgrade transaction.
Incorrect Answers
A:Upgrade installs available newer versions and changes the production machine.
C:Install targets one named package and does not inventory all pending upgrades.
D:Removing a package group is a destructive operation unrelated to viewing available updates.
Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests