RedHat  EX200 Certified System Administrator (RHCSA) Exam Dumps and Practice Test Questions Set 3 (Q41-60)

Visit here for our full RedHat EX200 exam dumps and practice test questions.

Question 41:

Which command is used to add a new user with a home directory and a specific shell?

A) useradd -m -s /bin/bash username
B) adduser username
C) usermod -d /home/username -s /bin/bash username
D) passwd username

Answer: A

Explanation

The question asks which command adds a new user with a home directory and a specific shell. The correct answer is A, useradd -m -s /bin/bash username. User management is a fundamental RHCSA skill because administrators need to create accounts with correct permissions and environments for users and services.

In Linux, the useradd command is used to create new user accounts, and it comes with a variety of options that allow administrators to configure the user’s environment at creation time. Two commonly used options are -m and -s, each serving a specific purpose.

The -m option ensures that a home directory is automatically created for the new user. This home directory is typically located under /home/username and serves as a personal workspace where the user can store files, configuration settings, and other data. Without the -m option, the user would not have a default directory, which could lead to problems when applications try to write user-specific configuration files or when the user attempts to save personal data. By creating a home directory automatically, system administrators ensure that each user has a consistent environment to work in.

The -s option allows the administrator to specify the login shell for the user. The login shell is the interface through which the user interacts with the system, executing commands and running scripts. The default shell on most Red Hat-based systems is /bin/bash, which provides a rich command-line environment with features like command history, tab completion, and scripting capabilities. However, other shells like /bin/sh, /bin/zsh, or /bin/fish can be specified to suit different user preferences or scripting requirements. Selecting the appropriate shell ensures that the user has the intended environment and tools for their tasks, enhancing both productivity and usability.

Together, the -m and -s options streamline user account creation, providing both a dedicated workspace and a defined command-line interface, which are essential for effective user management and system organization.

Option B, adduser username, is a Debian-based system command and not standard in Red Hat. Option C, usermod -d /home/username -s /bin/bash username, modifies an existing user’s home directory and shell but does not create a new user. Option D, passwd username, sets or changes a user’s password but does not create accounts or configure home directories.

RHCSA candidates frequently encounter tasks involving creating users for administrative, service, or project purposes. Ensuring the user has a home directory and the correct shell is critical for scripting, running applications, and maintaining system security.

Thus, the correct answer is A because useradd with the -m and -s options creates a new user with a home directory and a specific shell, which is a core system administration skill.

Question 42:

Which command is used to check the SELinux current mode and policy?

A) getenforce
B) status
C) setenforce
D) seinfo

Answer: B

Explanation

The question asks which command checks the current SELinux mode and policy. The correct answer is B, status. SELinux is a critical component in Red Hat security, and understanding its status is essential for RHCSA candidates for troubleshooting and policy verification.

The sestatus command is a vital tool for Linux administrators to quickly ascertain the current state of SELinux (Security-Enhanced Linux) on a system. SELinux is a mandatory access control (MAC) system that provides an additional layer of security on top of the traditional discretionary access control (DAC) model used in Linux. By running sestatus, administrators can immediately determine whether SELinux is enabled or disabled, which is crucial because the security posture of a system heavily depends on SELinux being properly configured and active.

When SELinux is enabled, sestatus also shows the current enforcement mode. There are three primary modes: enforcing, permissive, and disabled. In enforcing mode, SELinux policies are fully applied, meaning that any action that violates the security policy is blocked, and a corresponding audit message is logged. This ensures that applications and users operate strictly within the defined security boundaries. In permissive mode, SELinux does not block actions but still logs violations, allowing administrators to troubleshoot and adjust policies without interrupting system operations. The disabled mode completely turns off SELinux enforcement, effectively bypassing the security mechanism, which might be necessary temporarily for troubleshooting but is generally discouraged in production environments.

In addition to the enforcement mode, sestatus provides information about the loaded policy type. Common policy types include targeted and MLS (Multi-Level Security). The targeted policy focuses on confining specific processes while leaving the rest of the system largely unrestricted, offering a balance between security and usability. The MLS policy enforces stricter controls and is often used in environments where highly sensitive information requires compartmentalized access.

Furthermore, sestatus displays the default enforcement mode, which indicates the system’s behavior on boot or after policy reloads. This helps administrators ensure consistency in security enforcement across system reboots. By regularly checking sestatus, system administrators can quickly verify that critical services, such as web servers, databases, and user processes, are operating under the correct security constraints. This proactive monitoring is essential to prevent unauthorized access, contain potential security breaches, and maintain compliance with organizational security policies.

Option A, getenforce, shows only the current enforcement mode (enforcing, permissive, or disabled) but does not provide policy type or configuration details. Option C, setenforce, changes the enforcement mode but does not display information. Option D, seinfo, provides detailed SELinux policy information but is not installed by default and is more suited for advanced policy analysis rather than basic status checks.

RHCSA candidates must verify SELinux status before configuring services like HTTPD, FTP, or Samba to ensure that permissions and access controls do not block functionality. Knowing how to check SELinux helps prevent misconfigurations and troubleshoot access issues efficiently.

Thus, the correct answer is B because status provides a complete summary of SELinux mode and policy, which is a key security and administration task in Red Hat environments.

Question 43:

Which command displays all active timers and their next execution time in systemd?

A) systemctl list-timers
B) systemctl list-timers –all
C) timerctl list
D) Both A and B

Answer: D

Explanation

The question asks which command displays all active timers and their next execution time in systemd. The correct answer is D. Both A and B Timers in systemd are used to schedule automated tasks and replace traditional cron jobs, which is a critical skill for RHCSA candidates.

systemctl list-timers shows active timers, their last and next execution time, the unit they trigger, and the left time until activation. Adding-all lists inactive timers as well, providing a complete view of scheduled tasks. This allows administrators to verify that maintenance tasks, backups, or updates are scheduled correctly and troubleshoot any misconfigurations.

Option C, timerctl list, is not a valid command in standard systemd installations. RHCSA candidates must know the correct systemctl syntax to monitor and manage timers effectively. Understanding timers is critical for automating tasks like log rotation, periodic backups, or maintenance scripts without relying on cron.

Using systemctl list-timers, administrators can confirm that services run as expected, detect skipped or failed timer executions, and adjust schedules as needed. This is particularly useful in environments where precision and reliability are required for automated tasks.

Thus, the correct answer is D because both systemctl list-timers and systemctl list-timers –all provide accurate information about active and scheduled timers, which is vital for system administration and task automation.

Question 44:

Which command is used to check the available storage space on all mounted filesystems?

A) df -h
B) du -sh /
C) lsblk
D) fdisk -l

Answer: A

Explanation

The question asks which command checks available storage space on all mounted filesystems. The correct answer is A, df -h. Disk space monitoring is a core RHCSA skill, as administrators need to ensure that services and applications have sufficient storage to function properly.

The df command reports the disk usage and availability of mounted filesystems. The -h option converts the output into human-readable units (MB, GB, etc), making it easy to interpret. It shows total size, used space, available space, and the mount point for each filesystem. This information is essential for monitoring storage health, preventing full disks, and planning for additional storage.

Option B, du -sh /, shows the size of a directory recursively but does not provide a system-wide overview. Option C, lsblk, lists block devices and partitions but does not display space usage statistics. Option D, fdisk -l, lists partition layouts but not disk usage or available space.

RHCSA candidates often need to monitor disk usage to troubleshoot storage-related issues, manage user directories, or plan for expanding volumes. Using df -h provides a quick and accurate view of filesystem usage, helping prevent system failures due to full disks.

Thus, the correct answer is A because df -h provides comprehensive information on storage availability for all mounted filesystems, which is a fundamental system administration skill.

Question 45:

Which command is used to check which users are currently logged in and their active processes?

A) who
B) w
C) users
D) last

Answer: B

Explanation

The question asks which command checks which users are currently logged in and their active processes. The correct answer is B, w. Monitoring logged-in users and their activity is an important RHCSA skill for system auditing, troubleshooting, and performance monitoring.

The w command in Linux is an essential tool for system administrators who need to monitor user activity and system usage in real time. Unlike simpler commands such as who or users, which only display basic information like usernames and login times, the w command provides a comprehensive overview of all currently logged-in users along with detailed system usage statistics. This makes it particularly useful for diagnosing performance issues, auditing user activity, and ensuring security compliance.

When executed, the w command displays a header containing the current time, how long the system has been running, the number of users currently logged in, and the system load averages for the past 1, 5, and 15 minutes. Below this header, it lists each user session in a tabular format, including several important fields. The USER field shows the username of the logged-in individual, while the TTY field identifies the terminal or pseudo-terminal the user is connected through. The FROM field indicates the source of the connection, which can help track remote logins.

The LOGIN@ field records the time at which the user logged in, and the IDLE field shows how long the session has been inactive. This information is critical for spotting abandoned sessions that might pose a security risk. Additionally, JCPU represents the cumulative CPU time consumed by all processes associated with that terminal, and PCPU shows the CPU time used by the user’s currently active process. This distinction helps administrators identify not only heavy users of CPU resources but also resource-intensive applications. Finally, the WHAT field provides the exact command or process that the user is currently running, giving direct insight into user activity and potential system strain.

Overall, the w command is a versatile and powerful tool for real-time system monitoring. By offering detailed information about user sessions, CPU usage, and active processes, it enables administrators to maintain system performance, detect abnormal behavior, and ensure the efficient use of server resources. It is particularly valuable in multi-user environments, where understanding who is logged in and what they are doing is crucial for both security and operational efficiency.

Option A, who, displays logged-in users and terminals but provides less detail about processes or CPU usage. Option C, users, lists only usernames of logged-in users without any additional information. Option D, last, shows login history but does not provide real-time process information.

RHCSA candidates may use w for troubleshooting system performance, auditing active sessions, or ensuring compliance with security policies. It helps administrators quickly identify who is connected and what tasks are consuming resources.

Thus, the correct answer is B because w gives a real-time overview of logged-in users and their active processes, which is essential for system monitoring, administration, and troubleshooting.

Question 46:

Which command is used to change file permissions recursively for a directory and its contents?

A) chmod -R 755 /directory
B) chown -R user:group /directory
C) ls -lR /directory
D) umask 022

Answer: A

Explanation

The question asks which command changes file permissions recursively for a directory and all its contents. The correct answer is A, chmod -R 755 /directory. File permission management is a core RHCSA skill because controlling access is crucial for system security, data protection, and application functionality.

The chmod command modifies file and directory permissions. The -R option applies the change recursively to all files and subdirectories within the specified directory. The numeric mode 755 assigns read, write, and execute permissions to the owner, and read and execute permissions to the group and others. This is commonly used for directories that need to be accessed by multiple users but maintained securely by the owner.

Option B, chown -R user:group /directory, changes the ownership of files and directories but does not modify permissions. Option C, ls -lR /directory, only lists permissions recursively and does not change them. Option D, umask 022, sets default permissions for newly created files and directories but does not alter existing files.

RHCSA candidates must understand chmod and recursive permission changes to secure web directories, user files, or shared project directories. Incorrect permission settings can lead to unauthorized access or prevent applications from functioning properly.

Thus, the correct answer is A because chmod -R changes permissions recursively, ensuring consistent access control across a directory structure, which is an essential system administration task.

Question 47:

Which command displays current kernel parameters and allows temporary modification?

A) sysctl -a
B) sysctl -w net.ipv4.ip_forward=1
C) cat /proc/sys/net/ipv4/ip_forward
D) Both A and B

Answer: D

Explanation

The question asks which command displays current kernel parameters and allows temporary modifications. The correct answer is D, both A and B) Kernel parameter management is an important RHCSA skill because it affects system performance, networking, and security configurations.

sysctl -a lists all kernel parameters and their current values, providing administrators with a comprehensive view of the system’s runtime configuration. This is useful for auditing, troubleshooting, and verifying system settings. sysctl -w allows administrators to change a kernel parameter temporarily; the change is immediate but not persistent across reboots. For example, sysctl -w net.ipv4.ip_forward=1 enables IP forwarding temporarily, which is often required for routing or network testing.

Option C, cat /proc/sys/net/ipv4/ip_forward, shows a specific parameter but does not allow modifications and provides only limited information. Using sysctl is preferred because it provides a standardized interface and supports batch changes.

RHCSA candidates need to differentiate between temporary runtime changes and persistent changes that require editing /etc/sysctl.conf. Temporary changes are used for testing, troubleshooting, or immediate operational needs, while persistent changes are needed for long-term system configuration.

Thus, the correct answer is D because sysctl -a displays all parameters and sysctl -w allows immediate temporary modification, both of which are essential for managing kernel parameters effectively in Red Hat systems.

Question 48:

Which command lists all currently loaded kernel modules?

A) lsmod
B) modprobe -l
C) cat /proc/modules
D) Both A and C

Answer: D

Explanation

The question asks which command lists all currently loaded kernel modules. The correct answer is D.. Both A and C) Kernel modules are essential for enabling hardware support, filesystems, and device drivers, making their management a critical RHCSA skill.

lsmod displays a concise list of currently loaded modules, including module name, size, and usage count. This is the most commonly used command for quickly checking active kernel modules. cat /proc/modules outputs similar information directly from the proc filesystem, including module dependencies and memory usage. Both methods allow administrators to verify which modules are active and troubleshoot hardware or driver issues.

Option B, modprobe -l, lists all modules available on the system, not necessarily those currently loaded. This is useful for identifying modules that can be loaded but does not indicate runtime usage. RHCSA candidates must be able to distinguish between modules available and modules currently loaded, as this affects hardware functionality, troubleshooting, and system performance.

Knowing how to list loaded modules allows administrators to identify unnecessary modules that may be consuming memory, troubleshoot missing driver support, and ensure that critical modules are loaded during boot. This is particularly useful in systems that interact with specialized hardware, network devices, or storage arrays.

Thus, the correct answer is D because both lsmod and cat /proc/modules provide accurate lists of currently loaded kernel modules, which is a key task for system administration and troubleshooting in Red Hat environments.

Question 49:

Which command displays current active network connections including ports and protocol?

A) ss -tuln
B) netstat -tuln
C) lsof -i
D) Both A and B

Answer: D

Explanation

The question asks which command displays current active network connections, including ports and protocols. The correct answer is D, both A and B) Monitoring network activity is a critical RHCSA skill, as it ensures services are operating correctly and helps detect unauthorized connections or performance bottlenecks.

ss -tuln displays active TCP and UDP connections with listening ports, showing protocol, local and remote addresses, and state. It is faster and more modern than netstat and is preferred in most recent Red Hat systems. netstat -tuln provides similar information for TCP and UDP connections, including listening ports, but it is considered legacy software. Both commands are essential for real-time monitoring of network services and troubleshooting connectivity issues.

Option C, lsof -i, lists open network sockets but provides more detailed process information rather than a simple connection overview. While useful in some scenarios, it is not as concise for general network monitoring.

RHCSA candidates need to understand the difference between active listening ports and established connections, identify misconfigured services, and ensure firewall rules align with active services. These commands are also used to verify network service availability and identify potential security threats.

Thus, the correct answer is D because both ss -tuln and netstat -tuln provide accurate, detailed information about active network connections, which is essential for network monitoring and system administration.

Question 50:

Which command is used to disable a systemd service permanently?

A) systemctl disable servicename
B) systemctl stop servicename
C) chkconfig servicename off
D) Both A and C

Answer: D

Explanation

The question asks which command disables a systemd service permanently. The correct answer is D.. Both A and C Managing services is a key RHCSA skill, as controlling which services start at boot affects system security, performance, and reliability.

systemctl disable servicename removes symlinks for the service in the default target, preventing it from starting automatically during boot. systemctl stop servicename only stops the service temporarily; it will start again at the next boot unless disableD. On older systems, chkconfig servicename off achieves the same effect for SysV init scripts, making it relevant for compatibility scenarios.

RHCSA candidates must differentiate between stopping a service temporarily and disabling it permanently. Temporary stopping is useful for maintenance, troubleshooting, or performance tuning. Permanent disabling ensures unused or potentially insecure services do not start automatically, reducing attack surfaces and conserving system resources.

Understanding systemctl and chkconfig ensures administrators can manage services consistently across modern and legacy Red Hat systems. Disabling unnecessary services is critical for hardening systems, especially on servers exposed to networks or running sensitive workloads.

Thus, the correct answer is D because both systemctl disable and chkconfig off permanently prevent a service from starting automatically, which is essential for proper service management in Red Hat environments.

Question 51:

Which command is used to mount a filesystem temporarily on a Red Hat system?

A) mount /dev/sdb1 /mnt
B) umount /mnt
C) fstab -a
D) mount -a

Answer: A

Explanation

The question asks which command mounts a filesystem temporarily. The correct answer is A, mount /dev/sdb1 /mnt. Filesystem management is a fundamental RHCSA skill because accessing and managing storage devices is crucial for system functionality, backups, and data availability.

The mount command allows administrators to attach a filesystem to a directory, making its contents accessible. Using mount /dev/sdb1 /mnt attaches the device sdb1 to the /mnt directory immediately. This is a temporary mount; it will not persist after a system reboot unless added to /etc/fstaB) Temporary mounts are useful for testing disks, accessing external storage, or performing one-time maintenance tasks.

Option B, umount /mnt, is used to unmount a filesystem, not mount it. Option C, fstab -a, is not a valid command; /etc/fstab is a configuration file, not a command. Option D, mount -a, mounts all filesystems listed in /etc/fstab, which is different from mounting a specific device temporarily.

RHCSA candidates must understand how to mount and unmount filesystems correctly to access storage devices, perform backups, or recover datA) Temporary mounts are often used during troubleshooting or when testing new partitions without altering system startup behavior.

Thus, the correct answer is A because mount /dev/sdb1 /mnt allows immediate, temporary access to a filesystem, which is an essential task for system administration and practical exam scenarios.

Question 52:

Which command shows the default gateway configured on a Red Hat system?

A) ip route show
B) route -n
C) netstat -rn
D) All of the above

Answer: D

Explanation

The question asks which command shows the default gateway. The correct answer is D, all of the above. Network configuration and troubleshooting are critical RHCSA skills because proper routing ensures communication with other networks and the internet.

ip route show is the modern command to display the kernel routing table, including the default route. The default gateway is listed with the keyword “default” followed by the gateway IP. route -n is a legacy command showing the routing table numerically, which is still supported on Red Hat systems. netstat -rn provides similar output, displaying the routing table in a numeric format.

Understanding all these commands is essential for network troubleshooting, verifying system connectivity, and configuring static routes. RHCSA candidates may need to identify missing routes, misconfigured gateways, or conflicts between multiple network interfaces.

Option D is correct because all listed commands provide accurate information on the default gateway. Knowing both modern and legacy commands ensures compatibility across various Red Hat system versions and aids in exam scenarios where multiple approaches may be required.

Thus, the correct answer is D because ip route show, route -n, and netstat -rn all allow administrators to view the default gateway, which is fundamental for proper network management and troubleshooting.

Question 53:

Which command is used to schedule a recurring job using cron?

A) crontab -e
B) at
C) batch
D) systemctl start cron

Answer: A

Explanation

The question asks which command schedules recurring jobs using cron. The correct answer is A, crontab -e. Job scheduling is a fundamental RHCSA skill because automating tasks ensures system efficiency, reliability, and consistency.

crontab -e opens the current user’s crontab file in an editor, allowing administrators to define scheduled commands and scripts using a time-based format. Each line in the crontab file specifies the minute, hour, day, month, weekday, and command to execute. This tool is essential for recurring backups, log rotation, system monitoring, and automated maintenance tasks.

Option B, at, schedules a one-time job and is not suitable for recurring tasks. Option C, batch, schedules jobs to run when system load is low, also not for recurring execution. Option D, systemctl start cron, starts the cron service but does not create scheduled tasks.

RHCSA candidates must understand cron syntax and verify cron jobs are active to ensure tasks run as intended. Misconfigured cron jobs may lead to missed backups, failed monitoring, or other operational issues. Proper understanding includes knowing the difference between user-specific crontabs and system-wide cron directories.

Thus, the correct answer is A because crontab -e is the standard command for scheduling recurring jobs on Red Hat systems, which is a core system administration skill.

Question 54:

Which command is used to display a detailed list of all active processes along with their CPU and memory usage?

A) top
B) ps aux
C) htop
D) All of the above

Answer: D

Explanation

The question asks which command shows a detailed list of active processes with CPU and memory usage. The correct answer is D, all of the above. Process monitoring is essential for RHCSA candidates to manage system performance, troubleshoot resource usage, and optimize services.

top provides a real-time, dynamic view of processes with information on CPU, memory, process ID, and owner. Administrators can sort and filter processes to identify resource-intensive tasks. ps aux outputs a snapshot of all running processes, including user, CPU, and memory usage, suitable for scripting or logging. htop is an interactive version of top with additional features such as scrolling, tree view, and easy process management.

Understanding all these commands ensures candidates can monitor system performance in real time, identify runaway processes, and take corrective actions. Different tools serve different scenarios: top for quick real-time monitoring, ps aux for static snapshots or automation, and htop for interactive management.

Thus, the correct answer is D because top, ps aux, and htop all provide detailed insights into active processes, which is fundamental for effective system administration in Red Hat environments.

Question 55:

Which command is used to display a system’s current runlevel in a systemd-based system?

A) runlevel
B) systemctl get-default
C) who -r
D) Both B and C

Answer: D

Explanation

The question asks which command displays the current runlevel in a systemd-based system. The correct answer is D. Both B and Understanding system targets and runlevels a fundamental RHCSA skills because they help manage system states and troubleshoot service-related issues.

systemctl get-default shows the default systemd target, which is equivalent to the traditional runlevel (e.g., multi-user.target or graphical.target). who -r displays the current runlevel and the last runlevel change, providing a snapshot of the active system state. Both commands help administrators verify that the system is in the intended operational mode.

Option A, runlevel, shows the previous and current runlevel in legacy systems but may not reflect systemd targets accurately. Understanding the difference between persistent targets (default) and temporary changes is essential for tasks such as maintenance, single-user mode recovery, or service isolation.

RHCSA candidates must use these commands to verify boot targets, troubleshoot services, and ensure proper system operation. Using systemctl get-default and who -r together provides both the default boot target and the current state, allowing comprehensive system analysis.

Thus, the correct answer is D because both systemctl get-default and who -r give accurate insights into the system’s current runlevel or target, which is essential for effective system administration and troubleshooting in Red Hat systems.

Question 56:

Which command is used to permanently add a static IP address on a network interface in Red Hat?

A) nmcli connection modify eth0 ipv4.addresses 192.168.1.10/24
B) ifconfig eth0 192.168.1.10 netmask 255.255.255.0
C) ip addr add 192.168.1.10/24 dev eth0
D) ip link set eth0 up

Answer: A

Explanation

The question asks which command permanently adds a static IP address to a network interface in Red Hat. The correct answer is A, nmcli connection modify eth0 ipv4.addresses 192.168.1.10/24. Network configuration is a critical RHCSA skill, as proper IP configuration ensures communication within the local network and internet.

nmcli is the command-line interface for NetworkManager, the standard service in Red Hat for managing network interfaces. Using nmcli connection modify along with the ipv4.addresses option permanently sets a static IP for the interface. This change persists across reboots and does not require editing configuration files manually, which reduces the risk of misconfiguration.

Option B, ifconfig eth0 192.168.1.10 netmask 255.255.255.0, temporarily sets an IP address for the current session but does not persist after a reboot. Option C, ip addr add 192.168.1.10/24 dev eth0, also temporarily assigns the address without persistence. Option D, ip link set eth0 up, only activates the interface but does not assign an IP address.

RHCSA candidates need to configure network interfaces permanently to support servers, client systems, and virtual machines. Ensuring static IPs are correctly applied prevents network failures, DHCP conflicts, and connectivity issues. Using nmcli also allows integration with other network settings like gateways and DNS.

Thus, the correct answer is A because nmcli connection modify allows administrators to assign a static IP permanently to a network interface, which is essential for reliable network management in Red Hat systems.

Question 57:

Which command is used to display currently active firewall rules in Red Hat using firewalld?

A) firewall-cmd –list-all
B) iptables -L
C) nft list ruleset
D) All of the above

Answer: D

Explanation

The question asks which command displays currently active firewall rules using firewallD. The correct answer is D, all of the above. Firewall management is a core RHCSA skill because controlling access to services and ports is crucial for system security and compliance.

firewall-cmd –list-all shows the active zone configuration, including allowed services, ports, and masquerading. It provides a high-level overview of the firewall rules applied to the system. iptables -L lists all rules in the traditional iptables framework, which firewalld may still use internally for compatibility. nft list ruleset shows the active rules in nftables, which is the modern framework replacing iptables.

Understanding all these commands ensures candidates can view and verify firewall rules across different Red Hat versions. RHCSA candidates often need to troubleshoot blocked services, confirm open ports, or verify security policies. Using all three commands provides flexibility and ensures compatibility with legacy and modern systems.

Option D is correct because firewall-cmd, iptables, and nft all allow administrators to check firewall rules and verify network security settings. Mastery of these commands is essential for auditing, troubleshooting, and maintaining secure Red Hat systems.

Thus, the correct answer is D because all listed commands provide valid methods to display active firewall rules, which is a fundamental system administration task in Red Hat.

Question 58:

Which command is used to create a new logical volume in LVM?

A) lvcreate -n lvname -L 10G vgname
B) vgcreate vgname /dev/sdb
C) pvcreate /dev/sdb
D) lvextend -L +5G /dev/vgname/lvname

Answer: A

Explanation

The question asks which command creates a new logical volume in LVM. The correct answer is A, lvcreate -n lvname -L 10G vgname. Logical Volume Management (LVM) is a critical RHCSA skill because it allows flexible storage allocation, resizing, and management beyond traditional partitioning.

lvcreate creates a logical volume within a volume group. The -n option specifies the logical volume name, while -L sets its size. By specifying the volume group, administrators can allocate space dynamically and manage storage more efficiently. Logical volumes are useful for managing databases, application storage, and flexible system partitions.

Option B, vgcreate vgname /dev/sdb, creates a new volume group but does not create a logical volume. Option C, pvcreate /dev/sdb, initializes a physical volume for use in LVM but does not create a logical volume. Option D, lvextend -L +5G /dev/vgname/lvname, increases the size of an existing logical volume rather than creating a new one.

RHCSA candidates must understand the sequence of creating physical volumes, volume groups, and logical volumes. Proper use of lvcreate allows flexible storage allocation, easy resizing, and better management of system storage, which is often tested in practical exams.

Thus, the correct answer is A because lvcreate allows administrators to create a logical volume of a specified size in a chosen volume group, which is an essential task for LVM management in Red Hat systems.

Question 59:

Which command displays all currently mounted filesystems along with type and mount options?

A) mount
B) df -T
C) findmnt
D) All of the above

Answer: D

Explanation

The question asks which command displays currently mounted filesystems with type and mount options. The correct answer is D, all of the above. Monitoring mounted filesystems is a core RHCSA skill because it ensures storage is accessible, configured correctly, and performing as expected.

The mount command, without options, lists all mounted filesystems along with their mount points, device names, and options. df -T shows mounted filesystems with type and disk usage statistics, helping administrators monitor space and filesystem types. findmnt presents a tree-like view of mounted filesystems with options, source devices, and target directories, making it intuitive for system analysis.

Understanding all commands provides flexibility for different scenarios. RHCSA candidates often need to verify that partitions, network shares, or logical volumes are mounted correctly, detect missing mounts, or troubleshoot read-only filesystems. Using all three commands ensures comprehensive information for auditing, monitoring, and maintenance tasks.

Thus, the correct answer is D because mount, df -T, and findmnt all allow administrators to view mounted filesystems with type and options, which is essential for system monitoring and administration.

Question 60:

Which command is used to check the status of a systemd service including whether it is running and its last log entries?

A) systemctl status servicename
B) journalctl -u servicename
C) service servicename status
D) Both A and B

Answer: D

Explanation

The question asks which command checks the status of a systemd service, including whether it is running and its recent logs. The correct answer is D, both A and B.  Service management is a key RHCSA skill because controlling and monitoring services ensures system reliability, availability, and proper operation.

systemctl status servicename shows the service’s current state (whether it is active, inactive, or failed).. It provides additional information like process IDs, memory usage, and whether the service is enabled at boot. journalctl -u servicename displays recent log entries for the specific service, allowing administrators to troubleshoot errors, check startup behavior, and monitor runtime activity.

Option C, service servicename status, works for legacy SysV init scripts but does not provide the detailed journal logs available with systemd. Using both systemctl and journalctl together gives a comprehensive view of service health and historical behavior.

RHCSA candidates must verify that services are running correctly, identify failures, and troubleshoot using logs. Understanding how to combine status checks with journal review is essential for practical exam scenarios and real-world system administration tasks.

Thus, the correct answer is D because both systemctl status and journalctl -u provide complete information on a service’s state and logs, which is crucial for effective service monitoring and troubleshooting in Red Hat systems.

 

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!