Examination Questions And Correct
Answers (Verified Answers) Plus
Rationales 2026 Q&A | Instant
Download Pdf
1.
A system administrator needs to ensure a service automatically restarts if it
crashes. Which systemd directive should be used?
A) RestartSec
B) Restart
C) ExecStart
D) WantedBy
B) Restart
Rationale: Systemd uses the Restart directive in a service unit file to define the
restart behavior when a service fails or exits unexpectedly. Options like
RestartSec only define delay timing, ExecStart defines the command to run, and
WantedBy is for installation targets. The key requirement is automatic recovery
after failure, which is controlled directly by Restart policies such as always, on-
failure, or on-abnormal.
2.
Which command is used to apply SELinux context changes recursively to a
directory?
,A) restorecon
B) setsebool
C) chcon
D) semanage fcontext
D) semanage fcontext
Rationale: semanage fcontext defines persistent SELinux file context rules, and
when combined with restorecon, applies them recursively and consistently
across reboots. chcon is temporary and lost after relabeling. setsebool modifies
SELinux booleans, not file contexts. restorecon applies existing rules but does not
define them.
3.
Which tool is primarily used in RHCE for automation and configuration
management?
A) Puppet
B) Ansible
C) Chef
D) Terraform
B) Ansible
Rationale: RHCE focuses heavily on Ansible as the native automation tool in Red
Hat environments. It is agentless, uses SSH, and relies on YAML playbooks.
Puppet and Chef are alternative configuration tools but not part of RHCE
objectives. Terraform is for infrastructure provisioning, not OS-level
configuration.
4.
What is the default port for SSH?
,A) 21
B) 22
C) 80
D) 443
B) 22
Rationale: SSH (Secure Shell) uses port 22 by default for encrypted remote
administration. Port 21 is FTP, 80 is HTTP, and 443 is HTTPS. SSH is fundamental
in RHCE for remote system management and automation execution.
5.
Which command shows active systemd services?
A) systemctl list-units
B) systemctl status all
C) service --status
D) chkconfig --list
A) systemctl list-units
Rationale: systemctl list-units displays currently loaded and active units in
systemd. systemctl status is used for individual services. service and chkconfig
are legacy SysV tools and not primary in modern RHCE systems.
6.
Which file is used for persistent network configuration in RHEL 9?
A) /etc/hosts
B) /etc/sysconfig/network-scripts
C) /etc/NetworkManager/system-connections
D) /etc/resolv.conf
C) /etc/NetworkManager/system-connections
, Rationale: Modern RHEL systems use NetworkManager, which stores persistent
connections in /etc/NetworkManager/system-connections. The other files either
handle DNS (resolv.conf), hostname resolution (hosts), or legacy configurations.
7.
Which command creates a new user with home directory?
A) useradd -M
B) useradd -m
C) adduser -H
D) usermod -m
B) useradd -m
Rationale: The -m option ensures creation of a home directory for the new user. -
M explicitly prevents home creation. usermod modifies existing users, and
adduser is distribution-dependent.
8.
What is the purpose of SELinux enforcing mode?
A) Logs only violations
B) Disables security
C) Enforces policy rules
D) Deletes policies
C) Enforces policy rules
Rationale: Enforcing mode actively applies SELinux policies, blocking
unauthorized actions. Permissive mode only logs violations, not enforcing them.
Disabled turns SELinux off entirely.
9.