EX200 Essential Tools Practice Question
A Red Hat Enterprise Linux server has been configured with a custom repository for offline updates. The administrator runs 'yum repolist' and the custom repository is not listed. Which command should be used to verify that the repository configuration file is valid and located in the correct directory?
⚠ Common exam trap
Candidates often assume a specialized yum subcommand exists for repository validation (like 'yum repoinfo' or 'yum check-repo'), when in fact the simplest and most reliable method is to directly inspect the configuration file with 'cat' or 'vim'.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
cat /etc/yum.repos.d/custom.repo
The most direct way to verify that a repository configuration file is valid and located in the correct directory is to check its presence and syntax using 'cat /etc/yum.repos.d/custom.repo'. The repository configuration files must reside in /etc/yum.repos.d/ and have a .repo extension; if the file is missing or malformed, 'yum repolist' will not list the repository. This command simply reads the file, allowing the administrator to confirm its location and inspect its contents for errors.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
yum repoinfo
Why it's wrong here
The yum repoinfo command lists metadata such as repository IDs, names, and base URLs for currently enabled repositories, but it does not read the raw contents of a .repo file. If /etc/yum.repos.d/custom.repo exists but its repository is disabled or syntactically invalid, yum repoinfo will not display it, so it cannot prove the file is present at the expected path. The correct way to confirm the file itself is to use a plain file-read command.
- ✓
cat /etc/yum.repos.d/custom.repo
Why this is correct
Running cat /etc/yum.repos.d/custom.repo will print the exact bytes of the file to stdout, confirming both that the file exists in the proper /etc/yum.repos.d directory and what its repository configuration lines contain. If the file is missing, cat returns a nonzero exit status with a 'No such file or directory' error, so it provides an unambiguous, immediate pass/fail verification for this specific path.
- ✗
yum check-repo
Why it's wrong here
There is no yum subcommand named check-repo in Red Hat Enterprise Linux; the valid yum commands include repolist, repoinfo, check-update, and clean, among others. Running it will produce a 'no such command' usage error from yum, so it cannot perform any verification of the repository file. This option is invalid and does nothing useful.
- ✗
yum-config-manager --dump
Why it's wrong here
The yum-config-manager utility, provided by the yum-utils package, is not guaranteed to be installed on a minimal RHEL server, and its --dump option prints the repository configuration as parsed by yum, not the literal file contents. This output may merge values from multiple files or omit comments and blank lines, so it cannot confirm the exact existence and content of /etc/yum.repos.d/custom.repo. A direct cat command is the standard file-integrity check that does not depend on extra packages or yum's interpretation.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 127-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.