RHCSA RHCSA Linux Essentials 4 — Questions and Answers
Question 1: Which NFS mount option ensures the client retries indefinitely if the server is unavailable at boot?
- soft
- hard (Correct answer)
- retry=0
- intr
Correct answer: hard
The `hard` option causes the NFS client to keep retrying indefinitely until the server responds, preventing data corruption.
Question 2: You want to extend a logical volume `/dev/vg0/lv0` by 5 GiB while also resizing the XFS filesystem. Which command does both?
- lvextend -L +5G /dev/vg0/lv0 && xfs_growfs /mountpoint
- lvresize -r -L +5G /dev/vg0/lv0
- lvextend -r -L +5G /dev/vg0/lv0
- Both B and C are correct (Correct answer)
Correct answer: Both B and C are correct
Both `lvresize -r` and `lvextend -r` use the `-r` flag to resize the underlying filesystem automatically after extending the LV.
Question 3: Which file must be edited to persist an NFS mount across reboots?
- /etc/nfs.conf
- /etc/exports
- /etc/fstab (Correct answer)
- /etc/mtab
Correct answer: /etc/fstab
/etc/fstab is read at boot to mount filesystems, including NFS shares, automatically.
Question 4: What is the purpose of the `--system` flag in `useradd --system myservice`?
- Creates a user with UID below 1000 and no login shell or home directory by default (Correct answer)
- Creates a user in the wheel group automatically
- Locks the account immediately after creation
- Assigns the user to the systemd group
Correct answer: Creates a user with UID below 1000 and no login shell or home directory by default
System accounts get a UID below 1000, no aging, no home directory, and no login shell — suitable for service accounts.
Question 5: Which command verifies that an RPM package's files have not been modified since installation?
- rpm -qi package
- rpm -V package (Correct answer)
- rpm --check package
- yum verify package
Correct answer: rpm -V package
`rpm -V` (verify) checks file attributes like size, checksum, permissions, and timestamps against the RPM database.
Question 6: A process with PID 1234 is unresponsive. Which signal terminates it immediately without cleanup?
- kill -15 1234
- kill -2 1234
- kill -9 1234 (Correct answer)
- kill -1 1234
Correct answer: kill -9 1234
Signal 9 (SIGKILL) cannot be caught or ignored and forces the kernel to terminate the process immediately.
Question 7: Which command displays the routing table on a RHEL system?
- ip route show (Correct answer)
- route print
- netstat -i
- ifconfig -r
Correct answer: ip route show
`ip route show` (or `ip r`) displays the kernel routing table using the modern iproute2 suite.
Which NFS mount option ensures the client retries indefinitely if the server is unavailable at boot?