Skip to content

Day 3 Practice Exam Paper: Registration, Files, and the Filesystem

Note: This is a practice paper written in the style of a hands-on, performance-based exam. It is not a real exam, does not reproduce real exam questions, and its point values are for self-assessment only. Confirm the actual exam format and objectives on Red Hat's official EX200 page.


Exam Information

Item Detail
Suggested time 75 minutes
Total points 68 (self-assessed)
Environment Your own RHEL 9 or 10 practice VM
Account root (a root shell, for example from sudo -i)
Resources allowed Manual pages (man) only
Prerequisite A Red Hat account with a usable subscription for Tasks 1 to 5, and 20

Instructions

  1. Work only on a private practice VM that you can reset. Take a snapshot first.
  2. Perform every task from the command line.
  3. Grading is on the end result. Registration must still be in place at the end (Task 20). File and directory tasks must exist exactly as described.
  4. Files go in /root/exam3 unless stated. Create it first.
  5. Enter your Red Hat password only at a prompt. Never place it on the command line.
  6. Do not delete anything outside /root/exam3 (the only other file you create is in /var/tmp).
  7. Do not disable SELinux or the firewall.
  8. If your VM is already registered, record the starting state before Task 1 and adapt Tasks 1 to 4 accordingly.

Tasks

Task 0 (setup, 0 points) Create the directory /root/exam3.

Task 1 (5 points) Register the system with Red Hat using the Red Hat connector (rhc). Confirm that the connection is active.

Task 2 (3 points) Save the list of available repositories to /root/exam3/repos.txt.

Task 3 (3 points) Remove the connection created in Task 1. Save the output of the Subscription Manager status command to /root/exam3/status-after-disconnect.txt.

Task 4 (4 points) Register the system again, this time using Subscription Manager instead of the connector. Confirm the registration with the status command.

Task 5 (3 points) Install the command-line assistant package. Confirm with a package query that it is installed. If it is not available for your release, write the text not available to /root/exam3/assistant.txt instead.

Task 6 (5 points) Using as few commands as possible, create this directory structure under /root/exam3:

company/
├── hr/{docs,reports}
├── it/{docs,reports}
└── sales/{docs,reports}

That is, company contains hr, it, and sales, and each of those contains docs and reports.

Task 7 (3 points) Create /root/exam3/company/it/docs/readme.txt containing the single line IT documentation.

Task 8 (3 points) Add the line Updated to the end of readme.txt. The first line must remain.

Task 9 (5 points) Create /root/exam3/hundred.txt containing the numbers 1 to 100, one per line. Save the first 5 lines to /root/exam3/first5.txt and the last 5 lines to /root/exam3/last5.txt.

Task 10 (4 points) Copy the whole company directory, with all its contents, to /root/exam3/company-backup.

Task 11 (2 points) Rename /root/exam3/company-backup to /root/exam3/company-archive.

Task 12 (3 points) Move /root/exam3/company/it/docs/readme.txt into /root/exam3/company/hr/docs/. It must no longer exist in the original location.

Task 13 (3 points) Remove the sales directory and everything inside it from /root/exam3/company. Do not touch company-archive.

Task 14 (3 points) Create /root/exam3/reverse.txt containing the lines of /root/exam3/company/hr/docs/readme.txt in reverse order (last line first).

Task 15 (3 points) Determine whether /bin and /sbin are real directories or symbolic links. Save the long-format entries for both (not their contents) to /root/exam3/links.txt.

Task 16 (4 points) Save the systemd temporary-file cleanup configuration lines that control /tmp and /var/tmp to /root/exam3/tmp-age.txt. The file must show the age values actually configured on your system.

Task 17 (3 points) Create an empty hidden file named .config in /root/exam3. Save a long listing of /root/exam3 that includes hidden files to /root/exam3/listing.txt.

Task 18 (2 points) Create the file /var/tmp/exam3-keep.txt containing the single word keep.

Task 19 (3 points) Save a recursive listing of /root/exam3/company to /root/exam3/tree.txt.

Task 20 (4 points) At the end of the paper, make sure the system is registered and able to see repositories. Save the output of the Subscription Manager status command to /root/exam3/final-status.txt.


Self-Check Before You Finish

  • [ ] sudo dnf repolist lists repositories.
  • [ ] /root/exam3/company contains only hr and it (each with docs and reports).
  • [ ] readme.txt is under hr/docs, not under it/docs.
  • [ ] readme.txt has two lines, and reverse.txt has the same two lines in reverse order.
  • [ ] first5.txt shows 1 to 5, and last5.txt shows 96 to 100.
  • [ ] company-archive exists and still contains sales (it was copied before Task 13).
  • [ ] No registration or file task relied on typing a password on the command line.

Answer Key and Marking Guide

Try the paper first. Output varies by system, so compare meaning, not exact text. All commands assume a root shell.

Task 0

mkdir /root/exam3

Task 1

rhc connect
rhc status

rhc connect prompts for credentials. rhc status should report an active connection.

Task 2

dnf repolist > /root/exam3/repos.txt

Verify with cat /root/exam3/repos.txt that repositories are listed.

Task 3

rhc disconnect
subscription-manager status > /root/exam3/status-after-disconnect.txt
cat /root/exam3/status-after-disconnect.txt

The status should show that the system is not registered. Wording differs between releases.

Task 4

subscription-manager register
subscription-manager status

Task 5

dnf install -y command-line-assistant
rpm -q command-line-assistant

If the package is not available:

echo "not available" > /root/exam3/assistant.txt

Task 6

mkdir -p /root/exam3/company/{hr,it,sales}/{docs,reports}
ls -R /root/exam3/company

Task 7

echo "IT documentation" > /root/exam3/company/it/docs/readme.txt

Task 8

echo "Updated" >> /root/exam3/company/it/docs/readme.txt
cat /root/exam3/company/it/docs/readme.txt

Expected: two lines, IT documentation then Updated.

Task 9

seq 1 100 > /root/exam3/hundred.txt
head -n 5 /root/exam3/hundred.txt > /root/exam3/first5.txt
tail -n 5 /root/exam3/hundred.txt > /root/exam3/last5.txt

Task 10

cp -r /root/exam3/company /root/exam3/company-backup

-r is required to copy a directory.

Task 11

mv /root/exam3/company-backup /root/exam3/company-archive

Task 12

mv /root/exam3/company/it/docs/readme.txt /root/exam3/company/hr/docs/
ls /root/exam3/company/it/docs /root/exam3/company/hr/docs

Task 13

ls -R /root/exam3/company/sales          # confirm the target first
rm -r /root/exam3/company/sales

Warning: rm -r is not reversible. Check the path before pressing Enter. Do not use a wildcard here.

Task 14

tac /root/exam3/company/hr/docs/readme.txt > /root/exam3/reverse.txt
cat /root/exam3/reverse.txt

Expected: Updated then IT documentation.

Task 15

ls -ld /bin /sbin > /root/exam3/links.txt

On modern RHEL, the entries begin with l (symbolic links) and point into /usr.

Task 16

cat /usr/lib/tmpfiles.d/tmp.conf > /root/exam3/tmp-age.txt

If that path is missing:

systemd-tmpfiles --cat-config | grep -i tmp > /root/exam3/tmp-age.txt

The file should show lines for /tmp and /var/tmp with their age values.

Task 17

touch /root/exam3/.config
ls -la /root/exam3 > /root/exam3/listing.txt

Task 18

echo "keep" > /var/tmp/exam3-keep.txt

Task 19

ls -R /root/exam3/company > /root/exam3/tree.txt

Task 20

subscription-manager status > /root/exam3/final-status.txt
dnf repolist

Common mistakes

  • Using > instead of >> in Task 8, which loses the first line.
  • Forgetting -r in Task 10.
  • Removing company-archive instead of company/sales in Task 13.
  • Running ls -l instead of ls -ld in Task 15, which lists the contents of the links.
  • Leaving out the a in ls -la in Task 17, so hidden files do not appear.
  • Typing the Red Hat password on the command line.

Cleanup (after marking yourself)

rm -r /root/exam3
rm /var/tmp/exam3-keep.txt
subscription-manager unregister

Remove only the items you created. Unregister the VM if it is a throwaway test system.

Scoring (self-assessment)

Score Level
61 to 68 Excellent
48 to 60 Good. Review missed tasks
Below 48 Repeat the Day 3 lab and drills