RedHat  EX200 Certified System Administrator (RHCSA) Exam Dumps and Practice Test Questions Set 4 (Q60-80)

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

Question 61:

Which command is used to permanently set the hostname on a Red Hat system?

A) hostnamectl set-hostname myhost
B) hostname myhost
C) nmcli general hostname myhost
D) echo “myhost” > /etc/hostname

Answer: A

Explanation

The question asks which command permanently sets the hostname on a Red Hat system. The correct answer is A, hostnamectl set-hostname myhost. Hostname management is an essential RHCSA skill because the hostname identifies the system in networks, for logging, and during administration.

The hostnamectl command is a component of the systemd suite of tools, designed to provide a consistent and standardized method for managing a system’s hostname in modern Linux distributions. Unlike traditional methods, such as directly editing /etc/hostname or using the hostname command, hostnamectl integrates with the systemd infrastructure, allowing changes to take effect both immediately and persistently. This makes it especially useful for administrators who need to maintain reliable system identification in networked environments.

When an administrator uses hostnamectl set-hostname <hostname>, the command updates the static hostname, which is stored in system configuration files and persists across system reboots. This ensures that the system retains the same identity even after restarts, which is critical for consistent network communication, proper logging, and system management tasks that rely on hostname recognition. At the same time, hostnamectl updates the kernel hostname in real time, meaning the change takes effect immediately without requiring a reboot. This live update ensures that services, scripts, and network connections that depend on the current hostname can continue operating without interruption.

hostnamectl also provides additional information about the system, including the pretty hostname, which is a human-readable version suitable for display purposes, the static hostname, and the transient hostname, which might be assigned dynamically by a network service like DHCP. Administrators can view these details using hostnamectl status. This comprehensive approach helps maintain consistency across different system layers and reduces the risk of misidentification in multi-system or clustered environments.

In modern enterprise and cloud deployments, where servers often communicate with each other and log data centrally, having a standardized, persistent, and immediately effective hostname is crucial. hostnamectl simplifies this process, eliminating manual configuration errors, ensuring network consistency, and integrating smoothly with systemd-managed services. Its ability to manage hostnames efficiently makes it an essential tool for Linux system administration.

Option B, hostname myhost, only changes the hostname temporarily; it will reset after a reboot. Option C, nmcli general hostname myhost, is another valid approach but is less commonly used in RHCSA exam contexts. Option D, echo “myhost” > /etc/hostname, manually edits the hostname file, and may wo,rk but does not immediately update the kernel hostname.

RHCSA candidates need to understand hostname configuration for both temporary and permanent settings. Permanent changes are critical for systems in production environments to prevent hostname conflicts and maintain clear system identification. Using hostnamectl provides a reliable, systemd-integrated method)

Thus, the correct answer is A because hostnamectl set-hostname changes the system hostname permanently and updates it in real-time, which is crucial for consistent system identification and administration.

Question 62:

Which command is used to create a swap file and enable it immediately?

A) dd if=/dev/zero of=/swapfile bs=1G count=2
B) mkswap /swapfile
C) swapon /swapfile
D) All of the above in sequence

Answer: D

Explanation

The question asks which command sequence creates a swap file and enables it immediately. The correct answer is D, all of the above in sequence. Swap management is a fundamental RHCSA skill because it provides additional virtual memory, helping prevent out-of-memory errors.

First, dd if=/dev/zero of=/swapfile bs=1G count=2 creates a file filled with zeros, allocating the desired size for swap. mkswap /swapfile initializes the file as a swap area, preparing it for use by the kernel. swapon /swapfile immediately activates the swap file, making the space available for system memory management.

Individually, these commands are incomplete. Dd only creates a file; mkswap initializes it; swapon activates it. All three are required for proper swap file setup. Swap is often needed for systems with limited RAM, for heavy workloads, or for temporary memory extensions.

RHCSA candidates may be tested on creating a temporary swap for systems without downtime, verifying swap with free-hor swapon -s, and configuring swap permanently in /etc/fstab. Understanding this process ensures candidates can optimize memory resources efficiently.

Thus, the correct answer is D because the complete process—creating, initializing, and activating a swap file—requires all three commands in sequence, a critical system administration skill.

Question 63:

Which command is used to view SELinux logs for denied operations?

A) ausearch -m avc -ts today
B) journalctl -t setroubleshoot
C) cat /var/log/audit/audit.log | grep AVC
D) All of the above

Answer: D

Explanation

The question asks which command views SELinux logs for denied operations. The correct answer is D, all of the above. SELinux is a crucial security component in Red Hat systems, and monitoring denials is essential for troubleshooting permission issues.

ausearch -m avc -ts today searches the audit logs for Access Vector Cache (AVC) denials for the current day. journalctl -t setroubleshoot retrieves logs generated by the setroubleshoot service, which provides human-readable interpretations of SELinux denials. Using cat /var/log/audit/audit.log | grep AVC directly examines raw audit logs for AVC entries.

Each approach has advantages. Because Ausearch is structured and ideal for automated searches. journalctl provides context and integrates with systemd logs. Grep allows raw inspection for manual debugging. Understanding all three is necessary for RHCSA candidates to troubleshoot SELinux denials, fix permissions, and ensure services operate correctly under SELinux policies.

SELinux denials can prevent web servers, databases, and scripts from running. Being able to locate and interpret denial messages ensures candidates can resolve issues without compromising security.

Thus, the correct answer is D because all commands provide methods to view SELinux denials, making them essential for troubleshooting and maintaining secure Red Hat environments.

Question 64:

Which command is used to create a new group and assign a GID?

A) groupadd -g 2000 mygroup
B) useradd -g 2000 mygroup
C) groupmod -g 2000 mygroup
D) newgrp 2000

Answer: A

Explanation

The question asks which command creates a new group and assigns a GID. The correct answer is A, groupadd -g 2000 mygroup. Group management is a core RHCSA skill because organizing users into groups allows centralized permissions management and simplifies access control.

groupadd creates a new group, and the -g option specifies the Group ID (GID) explicitly. This ensures consistency, avoids conflicts with existing groups, and meets administrative policies that require specific GID ranges. Proper group configuration is essential for shared directories, applications, and services that rely on group-based permissions.

Option B, useradd -g 2000 mygroup, assigns a primary group to a user, not create a new group. Option C, groupmod -g 2000 mygroup, modifies an existing group’s GID, not creates one. Option D, newgrp 2000, switches the current session to a new group but does not create it.

RHCSA candidates must know how to create groups for users, assign proper GIDs, and maintain security policies. Group creation is often tested alongside user management, permission assignment, and collaborative access to directories.

Thus, the correct answer is A because groupadd -g 2000 mygroup reliably creates a new group with the specified GID, a critical skill for Red Hat administration.

Question 65:

Which command is used to extend the size of an existing logical volume and its filesystem?

A) lvextend -L +5G /dev/vgname/lvname
B) xfs_growfs /dev/vgname/lvname
C) resize2fs /dev/vgname/lvname
D) Both A and B or A and C, depending on the filesystem

Answer: D

Explanation

The question asks which command extends the size of an existing logical volume and its filesystem. The correct answer is D, both A and, or A an,d C, depending on the filesystem. LVM management is a crucial RHCSA skill because it allows dynamic allocation of storage without downtime.

First, lvextend -L +5G increases the logical volume size by 5 GB.) However, this only resizes the logical volume; the filesystem on it must also be expanded to use the new space. For XFS filesystems, xfs_growfs is used; for ext4 filesystems, resize2fs is applieD) This combination ensures both the volume and the filesystem reflect the increased size.

Option A alone does not resize the filesystem, potentially leaving usable space inaccessible. Options B and C alone cannot work without first extending the logical volume. RHCSA candidates need to understand both steps, verify the filesystem type, and ensure proper expansion without data loss.

Extending logical volumes is often tested in practical exams, including verification of the new size using df -h and lvdisplay. Understanding filesystem-specific tools ensures reliability and prevents corruption.

Thus, the correct answer is D because extending a logical volume and its filesystem requires lvextend plus the appropriate filesystem grow command, which is a key skill for storage management in Red Hat systems.

Question 66:

Which command is used to check the disk usage of files and directories in a human-readable format?

A) du -sh /path/to/directory
B) df -h
C) ls -lh /path/to/directory
D) stat /path/to/directory

Answer: A

Explanation

The question asks which command checks the disk usage of files and directories in a human-readable format. The correct answer is A, du -sh /path/to/directory. Disk usage analysis is an essential RHCSA skill because it allows administrators to monitor storage consumption, detect large files, and plan capacity effectively.

The du command estimates file space usage. The -s option provides a summary for the directory rather than listing every file, and -h makes the output human-readable by using units such as K, M, or G. This command is useful for analyzing directories before cleanup, backups, or migration, allowing administrators to prioritize storage management tasks.

Option B, df -h, reports filesystem-level disk usage rather than per-directory usage. Option C, ls -lh, lists files with sizes but does not aggregate directory sizes. Option D, stat, provides metadata for a file but not overall disk usage.

RHCSA candidates must understand how to locate storage hogs, monitor usage trends, and generate reports for system maintenance. Regular disk usage checks prevent unexpected storage exhaustion, which could affect services and applications.

Thus, the correct answer is A because du -sh gives a clear, summarized, and human-readable view of directory sizes, making it a fundamental tool for storage management on Red Hat systems.

Question 67:

Which command is used to permanently disable a user account?

A) usermod -L username
B) passwd -l username
C) changee -E 0 username
D) All of the above

Answer: D

Explanation

The question asks which command permanently disables a user account. The correct answer is D, all of the above. User management is a core RHCSA skill, and disabling accounts ensures system security by preventing unauthorized access.

usermod -L locks the password of the account, preventing login. passwd -l also locks the account password and makes it inactivechangege -E 0 sets the account expiration date to zero, effectively disabling the account immediately. Each method achieves the same end but through different mechanisms.

RHCSA candidates must know that disabling users is different from deleting them. Disabling accounts preserves home directories, files, and logs while preventing login, which is crucial for audits and compliance. These commands are commonly used for temporary suspensions, offboarding employees, or security remediation.

Understanding account management ensures administrators can maintain operational security, track account status, and follow organizational policies. Knowing multiple methods provides flexibility depending on the scenario.

Thus, the correct answer is D because all three commands effectively disable a user account permanently while preserving system integrity, an essential task for system administration.

Question 68:

Which command is used to change the primary group of a user?

A) usermod -g newgroup username
B) groupmod -g newgroup username
C) gpasswd -d username newgroup
D) newgrp newgroup

Answer: A

Explanation

The question asks which command changes the primary group of a user. The correct answer is A: usermod -g newgroup username. Group management is fundamental in RHCSA because primary groups determine file creation permissions and access control for collaborative environments.

usermod -g modifies the primary group associated with a user account. The primary group affects the default ownership of new files and directories created by the user. Ensuring correct group assignments is critical for shared directories, project access, and permission management.

Option B, groupmod -g, changes a group’s GID, not a user’s primary group. Option C, gpasswd -d, removes a user from a supplementary group but does not change the primary group. Option D, newgrp, temporarily switches the current session to a different group without permanently changing the user’s primary group.

RHCSA candidates must understand primary versus supplementary groups, permission inheritance, and how file ownership interacts with group assignments. Misconfigured groups can lead to denied access, improper file ownership, and security violations.

Thus, the correct answer is A because usermod -g allows administrators to set the primary group permanently, which is essential for managing permissions and collaborative access on Red Hat systems.

Question 69:

Which command is used to check listening ports and associated processes on a system?

A) ss -tulnp
B) netstat -tulnp
C) lsof -i -P -n
D) All of the above

Answer: D

Explanation

The question asks which command checks listening ports and associated processes on a system. The correct answer is D, all of the above. Monitoring network activity is a crucial RHCSA skill because it ensures proper service operation and helps detect unauthorized connections.

Monitoring network activity and understanding which processes are listening on specific ports is essential for Linux system administration, troubleshooting, and security auditing. Commands like ss, netstat, and lsof are powerful tools that provide insights into network connections, open ports, and associated processes, helping administrators maintain control over system networking.

The ss-tulnpcommand is part of the iproute2 suite, designed to replace older networking utilities with a more efficient and feature-rich alternative. The options used in this command are important to understand: -t lists TCP connections, -u lists UDP connections, -l filters only listening sockets, -n shows numerical addresses instead of resolving hostnames for faster output, and -p displays the process ID (PID) and process name associated with each socket. This command gives a real-time view of all active listening ports on a system, allowing administrators to quickly identify which services are running, detect unexpected open ports, and verify that critical applications are bound to the correct interfaces.

netstat -tulnp serves a similar function but is considered a legacy command in modern Linux distributions. While still widely used, it is part of the older net-tools package and lacks some of the performance and filtering enhancements available in ss. Nonetheless, netstat remains valuable for administrators working on older systems or those more familiar with its output format.

The lsof -i -P -n command provides even more detailed information. Here, -i lists all network files (connections), -P prevents port numbers from being converted to service names, and -n avoids resolving hostnames. Unlike ss or netstat, lsof links each network connection to the exact process, including user ownership and file descriptors, which makes it ideal for debugging network issues, tracing rogue processes, or identifying resource-intensive services.

Together, these commands give administrators multiple ways to monitor network activity, troubleshoot connectivity problems, and ensure system security by identifying unauthorized services or suspicious network behavior. Choosing the appropriate command depends on the level of detail required and the specific system environment.

Understanding these tools allows administrators to detect misconfigured services, verify firewall configurations, troubleshoot application connectivity issues, and identify potential security breaches. RHCSA candidates must know which services are actively listening and the processes responsible for them.

Option D is correct because all commands provide comprehensive insights into listening ports and associated processes. Mastery of these tools enables administrators to ensure network reliability, security, and performance.

Thus, the correct answer is D because ss, netstat, and lsof all allow administrators to monitor active listening ports and processes, which is essential for system monitoring and troubleshooting in Red Hat environments.

Question 70:

Which command is used to check the journal logs of the system in real-time?

A) journalctl -f
B) tail -f /var/log/messages
C) systemctl status servicename
D) dmesg

Answer: A

Explanation

The question asks which command checks the journal logs of the system in real-time. The correct answer is A, journalctl -f. Log monitoring is a critical RHCSA skill because logs provide insights into system performance, errors, and security events.

journalctl -f streams journal logs in real-time, displaying entries as they occur. This allows administrators to monitor system behavior, troubleshoot service failures, detect hardware errors, and verify configuration changes. It is particularly useful during debugging, service restarts, or system tuning.

Option B, tail -f /var/log/messages, provides a similar function but only for the legacy syslog file and does not include all systemd journal logs. Option C, systemctl status, shows service-specific logs but not the full system log stream. Option D, dmesg, shows kernel messages but not other system logs.

RHCSA candidates must differentiate between systemd journal logs, legacy syslog files, and kernel logs, as each provides unique insights into system operations. Real-time monitoring ensures administrators can respond quickly to errors, service failures, or unexpected events.

Thus, the correct answer is A because journalctl -f provides continuous real-time logs from the systemd journal, which is crucial for monitoring, troubleshooting, and maintaining Red Hat systems.

Question 71:

Which command is used to check the size of all partitions and mounted filesystems?

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

Answer: A

Explanation

The question asks which command checks the size of all partitions and mounted filesystems. The correct answer is A, df -h. Monitoring disk usage is a fundamental RHCSA skill because it allows administrators to ensure storage resources are used efficiently, detect overutilized partitions, and plan capacity.

Df (disk free) reports the available and used disk space for all mounted filesystems. The -h option provides output in a human-readable format using K, M, and G units. This command is essential for administrators to quickly assess filesystem utilization, detect potential storage bottlenecks, and plan for expansions or cleanups.

Option B, du -sh /, provides disk usage of a specific directory rather than the whole filesystem. Option C, lsblk, displays block devices and partitions but does not include usage statistics. Option D, fdisk -l, lists partition tables but does not provide information on filesystem usage.

RHCSA candidates must know df -h to monitor system storage, identify nearly full filesystems, and ensure that critical services have enough disk space. Regular checks prevent service failures, performance degradation, and unexpected system errors caused by insufficient storage.

Thus, the correct answer is A because df -h provides a clear summary of mounted filesystems and their sizes, which is a crucial task for effective storage management on Red Hat systems.

Question 72:

Which command is used to change the ownership of a file or directory?

A) chown user:  group filename
B) chmod 755 filename
C) chgrp group filename
D) ls -l filename

Answer: A

Explanation

The question asks which command changes the ownership of a file or directory. The correct answer is A, chown user group filename. File ownership and permissions are core RHCSA skills because they control access to files, enforce security policies, and manage multi-user environments.

Chown changes both the user and group ownership of a file or directory. Correctly setting ownership ensures that only authorized users and groups can read, modify, or execute files. This is particularly important for sensitive configuration files, shared directories, and critical system scripts.

Option B, chmod, changes permissions but not ownership. Option C, chgrp, changes only the group but not the user. Option D, ls -l, displays ownership and permissions but does not modify them.

RHCSA candidates must understand the difference between user ownership, group ownership, and permissions. Correct ownership assignment is essential for system security, compliance, and preventing unauthorized access. Misconfigured ownership can lead to security vulnerabilities, failed services, or accidental data exposure.

Thus, the correct answer is A because chown allows administrators to assign both user and group ownership to files and directories, which is fundamental for system administration on Red Hat systems.

Question 73:

Which command is used to list all active systemd targets and their status?

A) systemctl list-units –type=target
B) systemctl get-default
C) systemctl status
D) systemctl list-jobs

Answer: A

Explanation

The question asks which command lists all active systemd targets and their status. The correct answer is A, systemctl list-units –type=target. System targets represent different states of the system, such as graphical, multi-user, or rescue mode, which are fundamental RHCSA concepts.

systemctl list-units –type=target displays all active targets, their load state, active state, and description. This allows administrators to understand the system’s current operational state, troubleshoot boot issues, and manage services associated with specific targets. Active targets provide insight into which system components are running and which are inactive.

Option B, systemctl get-default, shows only the default target, not all active ones. Option C, systemctl status, shows the status of a specific service or unit, but not all targets. Option D, systemctl list-jobs, shows running jobs but does not summarize targets.

RHCSA candidates must know how to view active targets to manage system startup, change targets temporarily or permanently, and troubleshoot system failures. A proper understanding of targets ensures effective system maintenance and service management.

Thus, the correct answer is A because systemctl list-units –type=target provides a complete view of active systemd targets, which is essential for managing system states and ensuring operational reliability.

Question 74:

Which command is used to create a bootable ISO image from a directory?

A) genisoimage -o image.iso /path/to/directory
B) mkisofs -o image.iso /path/to/directory
C) xorriso -as mkisofs -o image.iso /path/to/directory
D) All of the above

Answer: D

Explanation

The question asks which command creates a bootable ISO image from a directory. The correct answer is D, all of the above. Creating ISO images is important for system installation, backups, and distribution of software packages, making it a valuable RHCSA skill.

genisoimage, mkisofs, and xorriso all create ISO images by packaging the contents of a directory into a standard ISO 9660 format. Each tool has specific options for bootable images, volume labels, and file attributes, but the core functionality is consistent: converting a directory structure into an ISO image suitable for burning to media or mounting virtually.

RHCSA candidates may need to prepare custom installation images, back up critical systems, or distribute software consistently across multiple servers. Understanding these commands allows administrators to ensure compatibility, proper boot functionality, and reliable deployment.

Thus, the correct answer is D because all three commands provide valid methods to generate ISO images from a directory, which is essential for Red Hat system administration tasks involving backups, installation, and deployment.

Question 75:

Which command is used to display all mounted devices with their UUIDs and filesystem types?

A) blkid
B) lsblk -f
C) findmnt -o TARGET, UUID,  FSTYPE
D) All of the above

Answer: D

Explanation

The question asks which command displays all mounted devices with UUIDs and filesystem types. The correct answer is D, all of the above. Managing storage devices requires accurate identification, mounting, and understanding of filesystem types, which is a key RHCSA skill.

blkid lists all block devices along with their UUIDs, filesystem types, and labels. lsblk -f shows block devices in a tree structure with their filesystem details, including UUIDs. findmnt -o TARGET, UUID, FSTYPE provides a structured view of mounted devices and essential attributes in a human-readable format.

RHCSA candidates must use these commands to verify filesystem identity, check for UUID conflicts, troubleshoot mounting issues, and configure /etc/fstab for persistent mounts. Understanding these outputs ensures accurate storage management and prevents data loss or misconfiguration.

Thus, the correct answer is D because blkid, lsblk -f, and findmnt -o TARGET,  UUID,  FSTYPE all allow administrators to view mounted devices with UUIDs and filesystem types, which is critical for system reliability and administration.

Question 76:

Which command is used to verify the integrity of a system package in Red Hat?

A) rpm -V package_name
B) rpm -qa | grep package_name
C) yum check package_name
D) dnf info package_name

Answer: A

Explanation

The question asks which command verifies the integrity of a system package. The correct answer is A, rpm -V package_name. Package verification ensures that installed files have not been altered, corrupted, or tampered with, which is a crucial RHCSA skill for system security and maintenance.

RPM -V checks the files installed by the package against the RPM database, verifying file size, checksum, permissions, type, owner, and group. Any discrepancies are reported, allowing administrators to detect corrupted files, unauthorized modifications, or accidental changes. Regular verification is essential for security compliance and troubleshooting package-related issues.

Option B, rpm -qa | grep package_name, lists installed packages but does not verify integrity. Option C, yum check package_name, may check dependencies but not file integrity. Option D, dnf info package_name, provides metadata about the package but does not verify files.

RHCSA candidates must understand package verification to maintain system integrity, audit installations, and detect security breaches. Being able to verify packages ensures the stability, reliability, and trustworthiness of critical system components.

Thus, the correct answer is A because rpm -V checks the integrity of package files, a fundamental system administration task on Red Hat systems.

Question 77:

Which command is used to change the time and date on a Red Hat system?

A) timedatectl set-time “YYYY-MM-DD HH:MM:  SS”
B) date -s “YYYY-MM-DD HH:MM:SS”
C) hwclock –set –date “YYYY-MM-DD HH:MM:SS”
D) All of the above

Answer: D

Explanation

The question asks which command changes the time and date on a Red Hat system. The correct answer is D, all of the above. Accurate system time is critical for logs, security, scheduling, and network synchronization, making this an essential RHCSA skill.

timedatectl is a systemd utility to set the system clock and manage time zones. Date -s sets the system time temporarily. hwclock –set updates the hardware clock, which persists across reboots. Using these commands together ensures both the system and hardware clocks are accurate.

RHCSA candidates must know how to change time, set time zones, synchronize with NTP, and maintain clock accuracy. Incorrect time can lead to failed cron jobs, authentication errors, or inconsistent log timestamps.

Thus, the correct answer is D because all three commands can change system time, providing flexibility in managing both system and hardware clocks on Red Hat systems.

Question 78:

Which command is used to add a new repository to the system for package installation?

A) yum-config-manager –add-repo http://repo_url
B) dnf config-manager –add-repo http://repo_url
C) echo “[repo] … ” > /etc/yum.repos.d/repo.repo
D) All of the above

Answer: D

Explanation

The question asks which command adds a new repository for package installation. The correct answer is D, all of the above. Package repository management is a fundamental RHCSA skill because it ensures access to required software and updates.

Yum-config-manager and dnf config-manager provide command-line ways to add repositories temporarily or permanently. Creating a .repo file in /etc/yum.repos.d manually also adds the repository. This flexibility allows administrators to add official, third-party, or custom repositories as needed.

RHCSA candidates must understand repository management to install packages, maintain software, and manage system updates. Proper repository configuration ensures reliability and security.

Thus, the correct answer is D because all three methods correctly add repositories to the system for package installation on Red Hat systems.

Question 79:

Which command is used to check memory usage and swap on a Red Hat system?

A) free -h
B) vmstat
C) top
D) All of the above

Answer: D

Explanation

The question asks which command checks memory usage and swap. The correct answer is D, all of the above. Monitoring memory is a key RHCSA skill because it ensures applications have sufficient resources and prevents system performance issues.

Free -h provides an overview of total, used, and available memory,, including swap. vmstat displays memory usage, processes, and I/O statistics, allowing performance analysis. The top shows real-time memory consumption per process and overall usage.

RHCSA candidates must monitor memory usage to troubleshoot performance issues, plan capacity, and optimize resource allocation. Understanding multiple tools provides flexibility for different troubleshooting scenarios.

Thus, the correct answer is D because free, vmstat, and top all provide essential insights into memory and swap usage on Red Hat systems.

Question 80:

Which command is used to schedule a one-time job at a specific time?

A) at 14:00
B) cron -e
C) batch
D) systemctl start job

Answer: A

Explanation

The question asks which command schedules a one-time job at a specific time. The correct answer is A, at 14:00. Job scheduling is a core RHCSA skill because it automates tasks, reducing manual intervention and ensuring timely execution of scripts.

The at command in Linux is a versatile utility that allows administrators to schedule commands or scripts to run at a specific time in the future. Unlike cron, which is designed for recurring tasks, it is intended for one-time execution, making it ideal for jobs that do not need to repeat daily, weekly, or monthly. This distinction is important for system management, as administrators can use it for tasks such as temporary maintenance scripts, delayed backups, or system notifications without cluttering the recurring job schedule.

To schedule a job, the syntax is straightforward: echo “<command>” | at <time> or by entering the interactive at prompt with at <time> and then typing the commands directly. The <time> argument can accept a variety of formats, such as exact times (14:30), relative times (now + 1 hour), or specific dates (12:00 2025-11-18). This flexibility allows precise control over when tasks are executed, which is particularly useful in scenarios like running resource-intensive scripts during off-peak hours or performing automated maintenance tasks during scheduled downtime.

Once jobs are queued, administrators can manage them using related utilities. The atq command lists all pending jobs in the queue, showing their job ID, scheduled time, and the user who created them. If a job needs to be removed before execution, the atrm <jobid> command can be used to cancel it. This job management capability provides a simple yet effective way to maintain control over scheduled tasks without requiring constant monitoring or manual execution.

Additionally, it integrates with system logging, allowing administrators to track job execution and troubleshoot issues if a command fails. Since jobs run independently of the user session, they are ideal for tasks that must continue even if the user logs out. Overall, it is a lightweight, reliable, and precise scheduling tool that complements cron by handling single-occurrence tasks efficiently, reducing administrative overhead while ensuring important scripts and commands execute exactly when needed.

Option B, cron-e is for recurring jobs, not one-time execution. Option C, batch, schedules jobs for execution when the system load is low. Option D, systemctl start, starts services but does not schedule jobs.

RHCSA candidates must understand the difference between at, batch, and cron for proper task automation. One-time tasks are essential for maintenance, updates, or testing without interfering with recurring tasks.

Thus, the correct answer is A because at schedules a job for one-time execution at a specified time, which is a vital skill for system administration in Red Hat environments.

 

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!