RedHat Red Hat Certified System Administrator - RHCSA - EX200 Exam Practice Test

Create a 1 GiB logical volume named lvbackup in volume group vgdata, format it with XFS, mount it on
/backup, and make it persistent.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
lvcreate -L 1G -n lvbackup vgdata
mkfs.xfs /dev/vgdata/lvbackup
mkdir -p /backup
echo "/dev/vgdata/lvbackup /backup xfs defaults 0 0" > > /etc/fstab
mount -a
df -h /backup
Detailed Explanation:
* lvcreate allocates a new LV from the existing VG.
* mkfs.xfs creates the filesystem.
* /etc/fstab makes the mount persistent across reboot.
* mount -a tests the fstab entry immediately.
* RHEL 10 storage documentation continues to use LVM and XFS as core administration topics. ( Red
Hat Documentation )
Configure Cron Job
Configure a cron job to automatically execute /usr/bin/echo hello every day at 14:23 for the user harry.
Correct Answer:
Solution:
[root@node1 ~]# systemctl status crond
[root@node1 ~]# systemctl enable crond
[root@node1 ~]# crontab -e -u harry
23 14 * * * /usr/bin/echo hello
# Verification
[root@node1 ~]# crontab -l -u harry
Create a Container Image
As the user "wallah," download the Containerfile from http://classroom/Containerfile.
Do not modify the content of this file. Build an image named "pdf."
Correct Answer:
Solution:
# Install container management tools
[root@node1 ~]# dnf -y install container-tools
# Execute operations as the user wallah
[root@node1 ~]# ssh wallah@localhost
# Download the container build file
[wallah@node1 ~]# wget http://classroom/Containerfile
# Log in to the image registry
[wallah@node1 ~]# podman login -u admin -p redhat321 registry.lab.example.com
# Build the container image using the Containerfile in the current directory, with the image name "pdf"
[wallah@node1 ~]# podman build -t pdf .
# View the images
[wallah@node1 ~]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/pdf latest 1d6e7ea71460 31 seconds ago 300 MB
registry.lab.example.com/ubi9-beta/ubi latest 28b0a4b69d9b 2 years ago 229 MB
Configure ACL permissions for user john on /share/dev.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* Read-only access:
setfacl -m u:john:r-- /share/dev
* Read-write access:
setfacl -m u:john:rw- /share/dev
* Remove ACL permissions:
setfacl -m u:john:--- /share/dev
Detailed Explanation:
* setfacl -m modifies the ACL.
* u:john:r-- grants read only.
* u:john:rw- grants read and write.
* u:john:--- effectively removes access for that ACL entry.
* ACLs are used when standard owner/group/other permissions are not enough.
Create /share/projects, make alex the owner, and configure the sticky bit so users cannot delete each other's files.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
mkdir -p /share/projects
chown alex /share/projects/
chmod a+rwx,+t /share/projects/
ls -ld /share/projects/
Detailed Explanation:
* chmod a+rwx gives read, write, and execute to everyone.
* +t sets the sticky bit.
* Sticky bit on a shared directory means users can create files, but only the file owner, directory owner, or
root can delete them.
* This is the same model used on /tmp.
Configure the system hostname and configure a static IP address on the existing NetworkManager connection.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* Set the hostname:
hostnamectl set-hostname server1.example.com
* Configure the existing connection with a static IP:
nmcli connection modify ens160 ipv4.address 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 1.1.1.1 ipv4.
method manual connection.autoconnect yes
* Bring the connection up:
nmcli connection up ens160
Detailed Explanation:
* hostnamectl is the correct modern command for changing the system hostname.
* nmcli is the correct tool for RHEL 10 network configuration because the old ifcfg style is removed in
RHEL 10, and NetworkManager keyfiles are the supported model.
* ipv4.method manual tells NetworkManager to use static addressing.
* connection.autoconnect yes ensures the profile activates automatically after reboot.
* nmcli connection up ens160 applies the changes immediately.
Configure AutoFS so that accessing /shares/projects mounts server1:/srv/nfs/projects.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
dnf install -y autofs
mkdir -p /shares
echo "/shares /etc/auto.shares" > > /etc/auto.master
echo "projects -fstype=nfs,rw server1:/srv/nfs/projects" > /etc/auto.shares
systemctl enable --now autofs
ls /shares/projects
Detailed Explanation:
* /etc/auto.master defines the main map.
* /etc/auto.shares defines the indirect mount entry.
* The mount happens on demand when /shares/projects is accessed.
* RHEL 10 file-system documentation includes AutoFS for on-demand mounts. ( Red Hat
Documentation )