RedHat  EX200 Certified System Administrator (RHCSA) Exam Dumps and Practice Test Questions Set 5 (Q80-100)

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

Which command is used to permanently mount a filesystem at boot using its UUID?

A) Edit /etc/fstab and use UUID=xxxx-xxxx
B) mount -a
C) blkid /dev/sdX
D) systemctl enable filesystem.  service

Answer: A

Explanation

The question asks which command permanently mounts a filesystem at boot using its UU.D. The correct answer is A, editing /etc/fstab with UUID=xxxx-xxxx. Permanent mounting ensures that filesystems are available automatically on system startup, a critical RHCSA skill for system reliability and administration.

In Red Hat systems, /etc/fstab is the configuration file that specifies how and where filesystems should be mounted. Using UUIDs rather than device names ensures stability, as device names can change between boots, especially with removable storage or multipath devices. Administrators can include mount point, filesystem type, options, and dump/pass settings to fully control mount behavior.

Option B mounts all filesystems in /etc/fstab for the current session, but does not guarantee that new entries are persisted unless fstab is updated. Option C, blkid, displays the UUIDs of devices but does not mount them. Option D: systemctl enable filesystem. Service is unrelated to filesystem mounting.

RHCSA candidates must understand how to configure persistent mounts, verify mount points, and troubleshoot errors. Incorrect configurations can prevent system startup, affect application availability, or cause data loss. Best practices involve testing mounts manually before adding them to fstab and using UUIDs for reliability.

Thus, the correct answer is A because editing /etc/fstab with UUID ensures permanent, stable filesystem mounting across reboots, which is essential for Red Hat system administration.

Question 82:

Which command is used to check the current kernel version and release information?

A) uname -r
B) cat /etc/redhat-release
C) hostnamectl
D) all of the above for different purposes

Answer: D

Explanation

The question asks which command checks the current kernel version and release information. The correct answer is D, all of the above for different purposes. Kernel and release information is essential for RHCSA candidates to verify system compatibility, troubleshoot issues, and manage updates.

In Linux system administration, knowing the operating system and kernel details is crucial for maintaining compatibility, applying updates, and troubleshooting hardware or software issues. Several commands provide this information, each focusing on a specific aspect of the system.

The uname -r command displays the running kernel version. The kernel is the core component of the operating system, managing hardware interactions, system resources, and process scheduling. By checking the kernel version, administrators can determine whether specific drivers, modules, or kernel patches are compatible with the system. For instance, installing a new hardware driver may require a minimum kernel version, or certain security patches may only apply to specific kernel releases. Monitoring kernel versions also helps maintain system stability and ensures compatibility with software that relies on kernel features.

The cat /etc/redhat-release command provides the Red Hat Enterprise Linux (RHEL) release version. This information is essential for package management, system updates, and referencing official documentation. Different RHEL releases may include different package versions, default configurations, or supported software stacks. Knowing the exact release version helps administrators select the appropriate repositories, avoid conflicts during package installation, and ensure that system instructions or guides are correctly followed.

The hostnamectl command extends this information by providing comprehensive system metadata. It displays the hostname, operating system name and version, architecture (e.g., x86_64 or ARM), and kernel version. This command integrates with systemd, ensuring that the reported information is accurate and consistent across various system components. Beyond version tracking, hostnamectl allows administrators to change the system hostname persistently and view transient or pretty hostnames, which is helpful for network management and identification in multi-system environments.

Together, these commands give administrators a complete view of the system’s environment, covering the kernel, operating system, architecture, and network identity. This knowledge is fundamental for ensuring system stability, planning updates, troubleshooting issues, and maintaining compatibility with hardware and software. Using them regularly helps maintain a secure and well-managed Linux infrastructure.

Option D is correct because each command provides unique and valuable information. RHCSA candidates may need to identify kernel versions for patching, confirm system versions during deployment, and ensure proper software installation. Understanding multiple ways to retrieve system version information provides flexibility and confidence during exams and real-world troubleshooting.

Thus, the correct answer is D because uname, /etc/redhat-release, and hostnamectl collectively allow administrators to verify kernel and OS release details, a core system administration skill.

Question 83:

Which command is used to monitor real-time disk I/O performance on a Red Hat system?

A) iostat -xz 1
B) vmstat 1
C) dstat -d
D) all of the above

Answer: D

Explanation

The question asks which command monitors real-time disk I/O performance. The correct answer is D, all of the above. Disk I/O monitoring is an essential RHCSA skill because it helps identify bottlenecks, optimize performance, and troubleshoot storage-related issues.

Monitoring disk performance and system resource usage is a critical part of Linux administration. Administrators need to ensure that disk I/O, CPU usage, and memory utilization remain within acceptable limits to maintain system performance, prevent bottlenecks, and optimize workloads. Several tools, such as iostat, vmstat, and dstat, provide real-time or near-real-time statistics that help achieve this.

The iostat -xz 1 command, part of the sysstat package, provides detailed statistics about disk and CPU utilization. The -x option reports extended disk statistics, including service time, average queue length, and percentage utilization, while -z suppresses lines for devices with no activity, keeping the output concise. The 1 at the end specifies a one-second refresh interval, allowing administrators to monitor activity in real time. This command displays important metrics like reads and writes per second, average request size, and disk throughput, enabling identification of disks that may be overutilized or experiencing high latency. By tracking these metrics, administrators can detect disk contention, evaluate whether additional I/O resources are needed, or plan disk upgrades.

The vmstat 1 command provides system-wide performance information, focusing on memory, swap, processes, and I/O. It reports statistics such as free and used memory, buffer and cache usage, swap activity, the number of runnable processes, blocked processes, and CPU idle and usage percentages. Additionally, vmstat shows block device I/O statistics, allowing administrators to understand how disk activity interacts with CPU and memory usage. This is especially useful for diagnosing performance problems caused by memory pressure or I/O waits and for assessing whether processes are creating bottlenecks.

The dstat -d command provides disk read and write statistics in a simple, easy-to-read format. It consolidates information about all block devices, showing real-time throughput and cumulative I/O counts. Unlike iostat, which offers detailed per-device metrics, dstat emphasizes clarity and quick interpretation, making it ideal for administrators who need a high-level overview of disk performance without deep analysis.

Collectively, these tools enable administrators to monitor, troubleshoot, and optimize system performance. iostat is ideal for detailed disk-level analysis, vmstat provides a holistic view of memory, CPU, and I/O interactions, and dstat delivers accessible real-time summaries. Using them together allows detection of I/O contention, identification of underperforming disks, and better workload distribution, ensuring that Linux systems run efficiently under both normal and high-demand conditions.

RHCSA candidates must understand disk I/O metrics to diagnose slow performance, plan for storage upgrades, and verify that high-demand applications perform efficiently. Real-time monitoring ensures proactive system management and minimizes downtime due to storage bottlenecks.

Thus, the correct answer is D because iostat, vmstat, and dstat all provide real-time disk I/O metrics, which are crucial for monitoring and troubleshooting Red Hat systems.

Question 84:

Which command is used to list all currently loaded kernel modules?

A) lsmod
B) modprobe -l
C) cat /proc/modules
D) all of the above

Answer: D

Explanation

The question asks which command lists all currently loaded kernel modules. The correct answer is D, all of the above. Kernel modules extend system functionality, support hardware, and provide features, making module management a key RHCSA skill.

lsmod shows currently loaded modules with memory usage and dependency relationships. modprobe -l lists all modules available in the filesystem, but can also be filtered for loaded ones. Cat/proc/modules provides a raw view of loaded modules in the kernel. Using these commands, administrators can verify driver availability, troubleshoot missing modules, and manage hardware support.

RHCSA candidates must understand module management to load/unload drivers, ensure proper hardware functionality, and troubleshoot kernel-related issues. Proper knowledge prevents hardware malfunctions and system instability.

Thus, the correct answer is D because lsmod, modprobe, and /proc/modules collectively provide insight into kernel modules, an essential task for Red Hat system administration.

Question 85:

Which command is used to configure a persistent static route on a Red Hat system?

A) nmcli connection modify eth0 +ipv4.routes “192.168.2.0/24 192.168.1.1”
B) ip route add 192.168.2.0/24 via 192.168.1.1
C) route add -net 192.168.2.0/24 gw 192.168.1.1
D) echo “192.168.2.0/24 via 192.168.1.1” >> /etc/sysconfig/network-scripts/route-eth0

Answer: A

Explanation

The question asks which command configures a persistent static route. The correct answer is A, nmcli connection modify eth0 +ipv4.routes “192.168.2.0/24 192.168.1.1”. Networking is a core RHCSA skill, and persistent routes ensure connectivity is maintained across reboots.

Using nmcli to modify the connection applies the route persistently through NetworkManager. The syntax specifies the destination network and gateway. This approach ensures that routes are automatically loaded at boot, providing consistent network behavior.

Option B, ip route add, only adds a temporary route for the current session. Option C, route add -net, is a legacy command and temporary. Option D manually writes to a route file, which works but is less standardized in modern systems with NetworkManager.

In Linux networking, understanding the difference between persistent and temporary routes is essential for RHCSA candidates, as proper routing ensures reliable communication within and between subnets, a key requirement in enterprise environments. Routes determine how packets are forwarded from one network interface to another and ultimately dictate whether systems can communicate effectively across local networks and the wider internet.

A temporary route is added manually using commands such as ip route add <network> via <gateway> or route add, and it exists only until the next system reboot. Temporary routes are useful for immediate testing, troubleshooting, or temporary network configurations. However, they are not suitable for production environments because they are lost on reboot, which can lead to network outages if critical routes are not re-established automatically.

In contrast, a persistent route remains configured across reboots. On RHEL-based systems, persistent routes are typically added in configuration files such as /etc/sysconfig/network-scripts/route-<interface> or using nmcli commands for NetworkManager-managed interfaces. Persistent routes are critical in enterprise settings, where stable inter-subnet communication is required for services like file sharing, database connections, or centralized authentication. Ensuring the proper configuration of persistent routes helps prevent network disruptions and reduces administrative overhead.

RHCSA candidates must also be able to verify routes using commands such as ip route show or route -n. These commands display the routing table, including destination networks, gateways, metrics, and associated interfaces. Verification allows administrators to confirm that routes are correctly applied and to identify misconfigurations that could block traffic. Additionally, understanding routing metrics, default gateways, and network masks is necessary for effective troubleshooting.

Troubleshooting network connectivity often involves checking whether packets are reaching the intended destination and whether the system is using the correct route. Commands like ping, traceroute, and ip route get <destination> are commonly used to test connectivity and trace the path packets take. By combining these tools with knowledge of persistent and temporary routes, administrators can quickly identify issues such as missing routes, incorrect gateways, or subnet mismatches.

Overall, mastering persistent versus temporary routing is a fundamental skill for RHCSA candidates. It ensures reliable communication between hosts and subnets, prevents unexpected downtime after reboots, and enables efficient troubleshooting in multi-network enterprise environments. By practicing route configuration, verification, and troubleshooting, candidates gain a solid foundation for managing real-world Linux networking scenarios.

Thus, the correct answer is A because nmcli modifies the connection with a persistent route, ensuring network stability and proper system configuration on Red Hat systems.

Question 86:

Which command is used to display information about network interfaces and their IP addresses?

A) ip addr show
B) ifconfig
C) nmcli device show
D) All of the above

Answer: D

Explanation

The question asks which command displays information about network interfaces and their IP addresses. The correct answer is D, all of the above. Network interface monitoring is a fundamental RHCSA skill because administrators must understand interface configurations, connectivity, and troubleshooting.

The ip addr show command, part of the iproute2 suite, provides detailed information about interfaces, IP addresses, link status, and associated parameters. It is the modern and preferred method for network interface management. Ifconfig is a legacy tool that also displays IP addresses and interface status; although deprecated, it is still available on many systems and may appear in exam scenarios. nmcli device show lists network devices managed by NetworkManager, including IP addresses, MAC addresses, and additional connection details. This tool integrates with modern Red Hat networking methods and is important for managing persistent configurations.

RHCSA candidates must understand these commands to verify network setups, troubleshoot connectivity problems, and ensure proper IP address assignment. Knowledge of both legacy and modern tools ensures flexibility in different system environments. Monitoring interfaces also helps detect misconfigurations, network conflicts, or disabled devices.

Thus, the correct answer is D because ip addr show, ifconfig, and nmcli device show all provide vital information about network interfaces and IP addresses, making them essential tools for Red Hat system administration.

Question 87:

Which command is used to change the SELinux mode to permissive temporarily?

A) setenforce 0
B) setenforce 1
C) sestatus
D) semanage permissive -a

Answer: A

Explanation

The question asks which command temporarily changes the SELinux mode to permissive. The correct answer is A, setenforce 0. SELinux (Security-Enhanced Linux) is a core security feature in Red Hat systems, and managing its modes is an important RHCSA skill.

setenforce 0 switches SELinux from enforcing mode to permissive mode temporarily without requiring a reboot. In permissive mode, SELinux logs violations but does not enforce policy, which is useful for troubleshooting applications blocked by SELinux rules. setenforce 1 restores enforcing mode, while sestatus shows the current mode. semanage permissive -a adds a policy module to permissive mode permanently, but does not immediately change the running mode.

Understanding temporary and permanent changes in SELinux is vital. RHCSA candidates must know how to diagnose SELinux-related issues, log denials, and adjust policies safely without compromising security. Temporary permissive mode allows testing and debugging, whereas permanent changes must be carefully managed.

Thus, the correct answer is A because setenforce 0 immediately switches SELinux to permissive mode temporarily, which is crucial for troubleshooting and maintaining system security in Red Hat environments.

Question 88:

Which command is used to display the last login times of users on the system?

A) last
B) lastlog
C) who
D) all of the above

Answer: D

Explanation

The question asks which command displays the last login times of users. The correct answer is D, all of the above. Tracking user login activity is a key RHCSA skill for security auditing, troubleshooting, and accountability.

The last command shows a list of recent logins for all users along with timestamps, terminal, and IP address information. Lastlogg provides a summary of the most recent login for each user in the system. It displays currently logged-in users and their login times, which is useful for real-time monitoring. Together, these tools provide administrators with comprehensive insight into user activity.

RHCSA candidates must understand how to use these commands to monitor access, detect suspicious behavior, and verify user activity for compliance. Effective tracking ensures system integrity, identifies potential security breaches, and aids in incident investigations.

Thus, the correct answer is D because last, lastlog, and who collectively provide information about user login activity, which is essential for maintaining security and accountability in Red Hat systems.

Question 89:

Which command is used to reload systemd units after modifying their configuration files?

A) systemctl daemon-reload
B) systemctl restart servicename
C) systemctl reload servicename
D) systemctl reenable servicename

Answer: A

Explanation

The question asks which command reloads systemd units after modifying their configuration files. The correct answer is A, systemctl daemon-reload. Systemd management is a core RHCSA skill, and understanding unit configuration changes is essential for proper service operation.

systemctl daemon-reload informs systemd to reload its configuration files and apply changes made to unit files. Without this, systemd will not recognize modified or newly added service files. systemctl restarts a service but does not reload unit files globally, systemctl reload reloads a running service without restarting it, and systemctl reenable re-enables a service at boot but does not reload its configuration immediately.

RHCSA candidates must understand the difference between reloading the systemd manager configuration and restarting or reloading services. Proper usage ensures new configurations are recognized, avoids unnecessary downtime, and maintains consistent service behavior.

Thus, the correct answer is A because systemctl daemon-reload reloads systemd unit configurations, which is crucial after making changes to service or target files on Red Hat systems.

Question 90:

Which command is used to verify the integrity of a file using its SHA256 checksum?

A) sha256sum filename
B) md5sum filename
C) sha1sum filename
D) cksum filename

Answer: A

Explanation

The question asks which command verifies the integrity of a file using a SHA256 checksum. The correct answer is A, sha256sum filename. File integrity verification is a fundamental RHCSA skill to ensure data authenticity, detect corruption, and prevent tampering.

sha256sum calculates the SHA256 checksum of a file and can be compared with a known checksum to verify integrity. md5sum calculates an MD5 hash, sha1sum calculates a SHA1 hash, and cksum uses a CRC checksum algorithm. SHA256 is considered stronger and more secure than older algorithms, making it preferred for Red Hat systems.

RHCSA candidates must understand checksum verification to validate downloads, confirm file integrity, and prevent security breaches due to corrupted or malicious files. Proper verification ensures software reliability, secure configuration files, and system stability.

Thus, the correct answer is A because sha256sum provides a reliable method to verify file integrity using SHA256, which is critical for secure Red Hat system administration.

Question 91:

Which command is used to check and repair a filesystem on Red Hat systems?

A) fsck /dev/sdX
B) e2fsck /dev/sdX
C) tune2fs -c 1 /dev/sdX
D) Both A and B

Answer: D

Explanation

The question asks which command checks and repairs a filesystem. The correct answer is D, both fsck and e2fsck. Filesystem maintenance is a critical RHCSA skill because it ensures data integrity, prevents corruption, and maintains system stability.

Fsck (file system consistency check) is a versatile utility used for checking and repairing many types of filesystems. When run on unmounted filesystems or in single-user mode, it can detect inconsistencies, repair corrupt blocks, and restore proper filesystem structure. e2fsck is specifically used for ext2, ext3, and ext4 filesystems, providing additional options and detailed reporting. Both commands are essential for proactive system maintenance and troubleshooting after improper shutdowns or hardware issues.

Option C, tune2fs -c 1, is used to adjust filesystem parameters like max mount count, but does not repair the filesystem. RHCSA candidates must understand the correct usage, run checks safely, and schedule maintenance without causing downtime or data loss. Proper use of these tools ensures the integrity of system and user data, aids in disaster recovery, and keeps production systems reliable.

Thus, the correct answer is D because both fsck and e2fsck are reliable tools for checking and repairing filesystems, a fundamental aspect of Red Hat system administration.

Question 92:

Which command is used to display active firewalld zones and their rules?

A) firewall-cmd –get-active-zones
B) firewall-cmd –list-all
C) firewall-cmd –state
D) All of the above

Answer: D

Explanation

The question asks which command displays active firewalld zones and rules. The correct answer is D, all of the above. Firewall management is a key RHCSA skill because it controls network access, protects services, and ensures security compliance.

Firewall-cmd –get-active-zones lists the zones currently active on interfaces, showing which interfaces are protected by which zone. Firewall-cmd –list-all displays detailed rules for a specific zone, including services, ports, and sources allowed or blocked. Firewall-cmd –state provides the current firewalld status, confirming whether the firewall is running. Collectively, these commands allow administrators to monitor, audit, and troubleshoot firewall configurations effectively.

RHCSA candidates must understand zones, services, ports, and interfaces to maintain a secure system, prevent unauthorized access, and comply with security policies. Correctly identifying active zones and their rules ensures protection against network attacks and misconfigurations.

Thus, the correct answer is D because all listed commands provide critical information about active firewalld zones and rules, essential for secure Red Hat system administration.

Question 93:

Which command is used to change the default target (runlevel) in Red Hat systems?

A) systemctl set-default multi-user.target
B) systemctl get-default
C) init 3
D) telinit 5

Answer: A

Explanation

The question asks which command changes the default target (runlevel). The correct answer is A, systemctl set-default multi-user. Target. Understanding systemd targets and runlevels is a core RHCSA skill because they define the system state, which services are running, and how the system boots.

systemctl set-default changes the default target for systemd, determining the mode in which the system starts on boot. For example, multi-user. Target is equivalent to runlevel 3 (multi-user, non-graphical and graphical. Target corresponds to runlevel 5 (graphical). systemctl get-default only displays the current default targetInitit 3 and telinit 5 are legacy commands that change the runlevel temporarily but do not persist across reboots.

RHCSA candidates must understand persistent and temporary changes to system targets, verify settings, and ensure proper boot configuration. Correctly configuring the default target ensures system stability, appropriate service startup, and efficient resource utilization.

Thus, the correct answer is A because systemctl set-default modifies the default target persistently, which is essential for managing system boot behavior in Red Hat systems.

Question 94:

Which command is used to display all active processes and their resource usage in real-time?

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

Answer: D

Explanation

The question asks which command displays active processes and resource usage in real-time. The correct answer is D, all of the above. Process monitoring is a fundamental RHCSA skill because administrators must track system performance, detect runaway processes, and manage resources effectively.

Top provides an interactive interface to monitor CPU, memory, and swap usage per process in real-time. htop offers a more user-friendly interface with additional sorting and filtering options. Ps aux displays all active processes with detailed information, though it is static by default. By using these tools, administrators can identify performance bottlenecks, terminate processes when necessary, and plan capacity.

RHCSA candidates must understand process priority, memory usage, CPU consumption, and the difference between real-time and static process monitoring. Effective use ensures optimal system performance, prevents resource starvation, and facilitates troubleshooting.

Thus, the correct answer is D because top, htop, and ps aux all provide insights into processes and resource usage, making them essential tools for Red Hat system administration.

Question 95:

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

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

Answer: A

Explanation

The question asks which command adds a new user with a specific home directory and default shell. The correct answer is A, useradd -m -d /home/username -s /bin/bash username. User management is a core RHCSA skill because it governs system access, security, and permissions.

useradd with the -m option creates a home directory, -d specifies the path, and -s sets the default shell. This ensures the user environment is properly configured and ready for use. adduser is often an interactive wrapper on some systems, but may not provide all options in a single command. passwd sets the user password after creation, and usermod modifies existing accounts rather than creating new ones.

RHCSA candidates must understand the relationship between user accounts, home directories, shells, and default permissions. Proper account creation ensures that users have a functional environment, access to the correct tools, and appropriate permissions for system security.

Thus, the correct answer is A because useradd with -m, -d, and -s allows administrators to create new users with a fully configured environment, a vital skill for Red Hat system administration.

Question 96:

Which command is used to schedule a recurring cron job to run at a specific time?

A) crontab -e
B) at 12:00
C) systemctl enable cro n.service
D) batch

Answer: A

Explanation

The question asks which command schedules a recurring cron job at a specific time. The correct answer is A, crontab -e. Task scheduling is a key RHCSA skill because it automates routine system maintenance, backups, and monitoring, reducing manual intervention.  Crontabb -e opens the user’s crontab file in an editor, allowing the creation of recurring jobs using a standard format specifying minutes, hours, days, months, and weekdays. This flexibility enables administrators to schedule scripts, maintenance tasks, and notifications automatically. At scheduled one-time tasks are performed, while batch schedules jobs during low system load. systemctl enable cron.  The service ensures the cron service starts at boot, but does not schedule jobs.

RHCSA candidates must understand cron syntax, file locations, and execution environments. Proper scheduling ensures consistent task execution, prevents service disruption, and maintains system reliability. Misconfigured cron jobs can lead to missed tasks, resource conflicts, or system instability.

Thus, the correct answer because crontab-e-e-eeee-eeee -e allows administrators to define recurring tasks with precise timing, an essential skill for Red Hat system administration.

Question 97:

Which command is used to display detailed information about a block device, including partitions, filesystems,, and mount points?

A) lsblk -f
B) blkid
C) df -h
D) mount

Answer: A

Explanation

The question asks which command displays detailed information about a block device, including partitions, filesystems, and mount points. The correct answer is A, lsblk -f. Understanding block devices is critical for RHCSA candidates because it allows them to manage storage, verify configurations, and troubleshoot disk issues.

In Linux system administration, managing storage devices and understanding the filesystem layout are essential for maintaining system stability, troubleshooting, and performing routine maintenance. Several commands provide information about block devices, filesystems, and mount points, each offering a different level of detail and perspective. Among them, lsblk -f, blkid, df -h, and mount are commonly used tools that together give administrators a comprehensive view of the system’s storage configuration.

The lsblk -f command provides a hierarchical view of all block devices on the system, including disks, partitions, and logical volumes. The -f option extends this output to include important filesystem information such as filesystem type, UUID, label, and mount point. This makes it easy to visualize the storage layout, see which partitions belong to which disks, and confirm that filesystems are properly formatted and mounted. For example, administrators can quickly identify root partitions, swap partitions, and additional storage volumes, which is particularly useful when managing servers with multiple drives or complex storage configurations.

The blkid command complements lsblk by displaying UUIDs and labels of all block devices. While blkid provides critical identification information, it does not show the hierarchical structure of devices or their mount points. This makes blkid most useful for scripting or when an administrator needs to reference a specific device by UUID or label, for example, when configuring /etc/fstab for persistent mounts.

The df -h command shows disk usage of mounted filesystems in a human-readable format. It is valuable for monitoring available space, identifying storage bottlenecks, and planning capacity upgrades. However, df -h only reports on currently mounted filesystems and does not provide detailed information about the underlying block devices or partition hierarchy.

Similarly, the mount command lists currently mounted filesystems along with their mount points and mount options. This is useful for checking which devices are actively used by the system, diagnosing mount-related errors, and understanding runtime configurations. However, like df -h, it lacks detailed information about the full partition structure and filesystem types across all block devices.

Together, these commands allow administrators to maintain an accurate and comprehensive understanding of system storage. lsblk -f is ideal for a detailed hierarchical overview and checking mount points, blkid is useful for device identification by UUID or label, df -h provides a quick look at usage statistics, and mount confirms active filesystem mounts. Using them in combination enables efficient storage management, accurate troubleshooting, and proper system configuration, which are critical for reliable Linux operation, especially in multi-disk or production environments.

RHCSA candidates must be able to verify disk layouts, identify new devices, and troubleshoot storage issues. This skill ensures proper management of partitions, filesystems, and storage allocation while preventing data loss or misconfiguration.

Thus, the correct answer is A because lsblk -f provides comprehensive block device information, making it a fundamental tool for Red Hat system administration.

Question 98:

Which command is used to list and manage system services on Red Hat systems?

A) systemctl list-units –type=service
B) service servicename status
C) chkconfig servicename –list
D) All of the above

Answer: D

Explanation

The question asks which command lists and manages system services. The correct answer is D, all of the above. Service management is a core RHCSA skill because administrators need to ensure that essential services are running, enabled at boot, and properly configured.

systemctl list-units –type=service displays active services with their load, active, and sub-states. It is the modern and preferred method in Red Hat systems using systemd. Service servicename status provides legacy compatibility for checking service status, but does not provide full systemd features. chkconfig lists legacy SysV service runlevels and whether they are enabled at boot, mainly for backward compatibility.

RHCSA candidates must understand both legacy and modern service management tools to administer services effectively across different Red Hat versions. Proper service management ensures system availability, security, and correct functionality of applications. Mismanaged services can lead to downtime, failed applications, or security vulnerabilities.

Thus, the correct answer is D because systemctl, service, and chkconfig collectively allow administrators to monitor, enable, and manage services efficiently, making it an essential skill for Red Hat system administration.

Question 99:

Which command is used to create a swap file and enable it on a Red Hat system?

A) dd if=/dev/zero of=/swapfile bs=1G count=2; mkswap /swapfile; swapon /swapfile
B) swapon -a
C) free -h
D) mount -t swap /swapfile

Answer: A

Explanation

The question asks which command creates a swap file and enables it. The correct answer is A) Swap management is an important RHCSA skill because swap space allows systems to handle memory pressure by using disk space when RAM is insufficient.

The command sequence creates a file of 2GB using dd, formats it as swap with mkswap, and activates it with swapon. This provides immediate swap space for the system. swapon -a enables all swap entries listed in /etc/fstab but does not create new swap. Free -h displays memory and swap usage but does not create swap. Mount -t swap is invalid because swap is managed differently than normal filesystems.

RHCSA candidates must know how to create, enable, and persist swap files for memory management. Proper swap configuration ensures system stability during high memory usage, supports applications, and prevents crashes. Understanding swap creation, verification, and persistence is critical for administering Red Hat systems effectively.

Thus, the correct answer is A because the dd, mkswap, and swapon sequence creates and enables swap, a fundamental system administration task.

Question 100:

Which command is used to configure a persistent hostname on a Red Hat system?

A) hostnamectl set-hostname newhostname
B) hostname newhostname
C) nmcli general hostname newhostname
D) All of the above

Answer: D

Explanation

The question asks which command configures a persistent hostname. The correct answer is D, all of the above. Hostname management is a core RHCSA skill because it ensures proper identification of systems on networks, which is essential for communication, security, and administration.

In Linux system administration, setting and managing the system hostname is a fundamental task that affects network identity, logging, and system management. There are multiple methods to change the hostname, each with its own scope, persistence, and integration with system components. Understanding these methods is important for administrators to ensure flexibility and proper system configuration across different environments.

The hostnamectl set-hostname command, part of the systemd suite, is the modern and preferred method for setting hostnames on systems that use systemd. It updates the static hostname, which is stored in system configuration files, and also modifies the kernel hostname immediately, without requiring a reboot. This dual functionality ensures that the hostname change takes effect right away and remains consistent across reboots. In addition, hostnamectl integrates with systemd-managed services, making it the most reliable option for modern Linux distributions. It also allows administrators to set pretty hostnames for human-readable purposes, which can be useful in multi-system or cloud environments.

The legacy hostname command is a simpler tool that can change the hostname for the current session only. When used without editing configuration files, the hostname change will be lost upon reboot. While this method is quick and effective for temporary adjustments, it is not suitable for persistent changes. It is still relevant in scenarios where administrators need to test hostname configurations without affecting the system permanently.

For systems managed with NetworkManager, the nmcli general hostname <hostname> command provides another way to set the hostname persistently. This method modifies the hostname through NetworkManager, ensuring that the change survives reboots and aligns with network configuration management. Using nmcli can be particularly useful in environments where network profiles are centrally managed or automated through scripts, as it integrates directly with NetworkManager’s configuration database.

Knowing multiple methods for changing hostnames ensures administrators can adapt depending on the system setup, whether it is a traditional Linux server, a systemd-based environment, or a network-managed setup. It also allows for troubleshooting scenarios where certain services may rely on different hostname sources.

In summary, hostnamectl provides a modern, persistent, and systemd-integrated method; hostname offers a temporary, session-specific change; and nmcli allows hostname management through NetworkManager. Mastery of all three methods equips administrators with the flexibility to manage hostnames efficiently across a variety of Linux deployments, ensuring network consistency, proper logging, and smooth operation of services that rely on system identity.

RHCSA candidates must verify hostname settings, ensure persistence, and troubleshoot naming issues to prevent conflicts, enable proper logging, and support networking. Misconfigured hostnames can cause connectivity issues, application failures, and administrative confusion.

Thus, the correct answer is D because hostnamectl, hostname, and nmcli all allow hostname configuration, making it an essential Red Hat system administration skill.

 

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!