RHCSA Linux System Administration Flashcards
7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 RHCSA Linux System Administration flashcards as text
Which command creates a new logical volume named 'data' of size 5GB in volume group 'vg0'?
Answer: lvcreate -L 5G -n data vg0
lvcreate -L specifies size and -n specifies the logical volume name within the volume group.
What does the command 'chage -M 90 alice' do?
Answer: Sets alice's maximum password age to 90 days
chage -M sets the maximum number of days before a password must be changed.
Which SELinux command restores default file context labels recursively on /var/www/html?
Answer: restorecon -Rv /var/www/html
restorecon -R applies recursively and -v provides verbose output, restoring default SELinux contexts.
A user needs to run 'systemctl restart httpd' without a password via sudo. Which sudoers entry is correct?
Answer: alice ALL=(ALL) NOPASSWD: /bin/systemctl restart httpd
The NOPASSWD tag must appear before the command specification in a sudoers rule.
Which command displays all active firewalld zones and their assigned interfaces?
Answer: firewall-cmd --get-active-zones
--get-active-zones shows only zones that have interfaces or sources bound to them.
What is the effect of setting 'net.ipv4.ip_forward = 1' in /etc/sysctl.conf?
Answer: Enables the system to forward IPv4 packets between interfaces
ip_forward = 1 enables kernel-level packet forwarding, making the host act as a router.
Which command permanently adds the 'http' service to the 'public' firewalld zone?
Answer: firewall-cmd --zone=public --add-service=http --permanent
The --permanent flag writes the rule to the zone configuration file so it persists across reloads.