Question Bank a well detailed practice exam
2025/2026 graded A+ well written !!!
Comprehensive Advanced-Level Multiple-Choice
Questions Covering RHCSA, RHCE, RHCA,
OpenShift, Ansible Automation, and Enterprise
Linux Administration
PART 1: RHCSA — Essential Tools and System Administration (Questions 1–35)
Section 1.1: Command Line and Essential Tools (Q1–Q10)
Question 1
A system administrator needs to find all files in /etc that have been modified within the last 7
days and are larger than 10 MB. Which command correctly accomplishes this task?
A) find /etc -size +10M -mtime +7
B) find /etc -size +10M -mtime -7
C) find /etc -size 10M -mtime 7
D) find /etc -size +10M -ctime -7
Correct Answer: B
Rationale: The find command uses -mtime -7 to find files modified within the last 7 days (less
than 7 days ago). The -size +10M finds files larger than 10 MB. Option A uses -mtime +7 which
finds files modified more than 7 days ago. Option C uses exact size matching rather than greater
than. Option D uses -ctime (change time) rather than -mtime (modification time).
,Question 2
Which of the following correctly describes the difference between a hard link and a symbolic
(soft) link in RHEL?
A) Hard links can span multiple filesystems; symbolic links cannot
B) Symbolic links point to the inode directly; hard links point to a pathname
C) Hard links share the same inode number; symbolic links have their own inode and point to a
pathname
D) Removing the original file breaks a hard link but not a symbolic link
Correct Answer: C
Rationale: Hard links share the same inode number and reference the same data blocks on disk.
Symbolic links have their own inode and store a pathname to the target file. Hard links cannot
span filesystems (option A is incorrect), symbolic links point to pathnames not inodes (option B
is incorrect), and removing the original file breaks a symbolic link but not a hard link (option D is
incorrect).
Question 3
A user attempts to access a remote system using SSH but receives "Connection refused." Which
of the following is the MOST likely cause?
A) The SSH service is not running on the remote system
B) The user's SSH key is incorrect
C) The firewall is blocking outbound traffic on port 22
D) The remote system's hostname cannot be resolved
Correct Answer: A
Rationale: "Connection refused" typically indicates that the remote system is actively rejecting
the connection attempt, most commonly because the SSH service (sshd) is not running or is not
listening on the expected port. Incorrect SSH keys would produce authentication errors, not
connection refused. Firewall blocking would typically result in a timeout rather than
"connection refused." Hostname resolution issues would produce "unknown host" errors.
Question 4
Which command displays the current SELinux mode and provides detailed policy information
including the loaded policy name?
,A) getenforce
B) sestatus
C) selinuxenabled
D) setenforce
Correct Answer: B
Rationale: sestatus displays the current SELinux mode (Enforcing, Permissive, or Disabled) along
with detailed information including the loaded policy name, policy version, and status of key
SELinux components. getenforce only shows the current mode without additional
details. selinuxenabled simply checks if SELinux is enabled and returns an exit code.
Question 5
A system administrator needs to archive the /var/log directory, compress it with maximum
compression, and preserve all permissions and ownership. Which command should be used?
A) tar -czvf logs.tar.gz /var/log
B) tar -cjvf logs.tar.bz2 /var/log
C) tar -cJvf logs.tar.xz /var/log --same-owner
D) tar -cpzvf logs.tar.gz /var/log
Correct Answer: C
Rationale: The -J option uses xz compression which provides the highest compression ratio
among common tar compression methods. The -p option preserves permissions. Option A uses
gzip (faster but less compression), option B uses bzip2 (good compression but less than xz), and
option D uses gzip with -p but doesn't specify --same-owner for ownership preservation. For
maximum compression, xz (-J) is preferred.
Question 6
Which of the following regular expressions would match lines containing either "error" or
"warning" in a log file using grep?
A) grep "error|warning" logfile
B) grep -E "error|warning" logfile
C) grep "error\|warning" logfile
D) Both B and C
Correct Answer: D
, Rationale: Both grep -E "error|warning" and grep "error\|warning" work correctly. The -
E option enables extended regular expressions where | is a metacharacter for alternation.
Without -E, the pipe character must be escaped with backslash. Option A would search for the
literal string "error|warning".
Question 7
What is the effect of the command chmod 2750 /project?
A) Sets read, write, and execute for owner; read and execute for group; no permissions for
others; sets SGID
B) Sets read, write, and execute for owner; read and execute for group; no permissions for
others; sets SUID
C) Sets read and write for owner; read and execute for group; no permissions for others; sets
SGID
D) Sets read, write, and execute for owner; read and write for group; no permissions for others;
sets SGID
Correct Answer: A
Rationale: In chmod 2750, the leading 2 sets the SGID bit (set-group-ID). The 750 sets rwx (7)
for owner, r-x (5) for group, and --- (0) for others. With SGID set, files created within the
directory inherit the group ownership of the directory. SUID would be indicated by 4 in the
leading position. Option C incorrectly describes the permissions, and Option D incorrectly
describes group permissions.
Question 8
Which command correctly adds a new user jdoe with a home directory /home/jdoe,
sets /bin/bash as the login shell, and assigns the user to the supplementary group developers?
A) useradd -d /home/jdoe -s /bin/bash -G developers jdoe
B) useradd -m -d /home/jdoe -s /bin/bash -g developers jdoe
C) useradd -m -d /home/jdoe -s /bin/bash -G developers jdoe
D) useradd -b /home/jdoe -s /bin/bash -G developers jdoe
Correct Answer: C
Rationale: -m creates the home directory, -d specifies the home directory path, -s sets the login
shell, and -G specifies supplementary groups. Option A lacks -m to create the home directory.