Mixed Deck — All RHCSA Topics Flashcards
100 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 20 Mixed Deck — All RHCSA Topics flashcards as text
Where does a system obtain its first supply of time when it starts up?
Answer: The hardware clock
When a system is started, it initially gets the system time from the hardware clock, also known as the real-time clock (RTC) or the BIOS clock. The hardware clock is a component of the computer's motherboard that keeps track of the current time and date even when the system is powered off or restarted.
Which command displays detailed information about an installed RPM package including its description and install date?
Answer: rpm -qi
rpm -qi shows package info (name, version, description, install date); -ql lists files, -qd lists docs, -qR lists dependencies.
A cron job entry reads: `*/15 * * * * /script.sh`. How often does it run?
Answer: Every 15 minutes
`*/15` in the minute field means 'every 15 minutes' (0, 15, 30, 45).
A system administrator needs to set default permissions for all new files created in a specific directory, `/srv/data`, so that new files automatically inherit the group ownership of the directory and can be modified by any member of that group. Which of the following commands would accomplish this for the directory?
Answer: chmod g+s /srv/data
The `chmod g+s` command sets the Set Group ID (SGID) bit on the directory. When SGID is set on a directory, any new files or subdirectories created within it will inherit the group ownership of the parent directory, not the primary group of the user who created them. This is essential for collaborative environments where files need to be accessible by a specific team.
What does the command 'wc -l filename' report?
Answer: Number of lines in the file
The wc -l option counts and displays the number of newline characters (lines) in a file.
What does `#!/bin/bash -x` at the top of a script do?
Answer: Enables debug mode, printing each command before execution
The `-x` flag enables shell trace mode, printing each command and its arguments to stderr before execution.
What is the purpose of the 'noatime' mount option in /etc/fstab?
Answer: Prevents updating the access time on files when they are read
noatime improves performance by not updating the access time (atime) metadata every time a file is read.
Which command removes a custom semanage fcontext rule that was previously added for /opt/myapp(/.*)?
Answer: semanage fcontext -d '/opt/myapp(/.*)?'
semanage fcontext -d deletes a previously added file context rule from the persistent policy database.
A service fails and audit.log shows 'type=AVC msg=audit: denied { name_connect } for pid=1234 comm="httpd"'. What does 'name_connect' indicate?
Answer: Apache attempted an outbound TCP connection to a remote port
name_connect is the SELinux permission checked when a process initiates an outbound TCP connection to a specific port number.
Where is the authorized public keys file stored for SSH key-based login on RHEL?
Answer: ~/.ssh/authorized_keys
The SSH daemon checks `~/.ssh/authorized_keys` in the target user's home directory for permitted public keys.
What does the 'pe_start' value represent in LVM physical volume metadata?
Answer: The offset where the first physical extent begins on the disk
pe_start is the offset in kilobytes from the beginning of the disk where the first physical extent starts.
Which command reloads systemd's configuration without rebooting after you add a new unit file?
Answer: systemctl daemon-reload
`systemctl daemon-reload` rescans all unit files and reloads systemd's configuration in place.
After making several changes to the permanent firewalld configuration, a sysadmin wants to activate them. What is the key difference between running `firewall-cmd --reload` and `systemctl restart firewalld`?
Answer: `--reload` keeps existing stateful connections alive, while `restart` drops all active connections.
The `firewall-cmd --reload` command loads the permanent configuration into the running firewall without losing the state information of current network connections. In contrast, `systemctl restart firewalld` stops and then starts the entire daemon, which will drop all active connections as the stateful firewall information is lost. For applying new permanent rules without interrupting service, `--reload` is the preferred method.
A logical volume named `lv_data` in the volume group `vg_apps` is almost full. A new physical disk, `/dev/sdd`, has been added to the system to provide more space. Which of the following sequences of commands correctly extends the logical volume to use the new disk?
Answer: 1. `pvcreate /dev/sdd` 2. `vgextend vg_apps /dev/sdd` 3. `lvextend -l +100%FREE /dev/vg_apps/lv_data` 4. `xfs_growfs /mount/point` or `resize2fs /dev/vg_apps/lv_data`
The correct procedure is to first initialize the new disk as a physical volume using `pvcreate`. Then, the volume group must be extended to include this new physical volume with `vgextend`. After the volume group has more space, the logical volume can be extended to use the available free space using `lvextend`. Finally, the filesystem on the logical volume must be resized to recognize and use the additional space; this is done with `xfs_growfs` for XFS filesystems or `resize2fs` for ext2/3/4 filesystems.
Which file on RHEL must be updated to allow the new SSH port through the SELinux policy?
Answer: semanage port -a -t ssh_port_t -p tcp NEWPORT
You use `semanage port -a -t ssh_port_t -p tcp ` to add the new port to the SELinux SSH port type policy.
To add a new device to `/etc/fstab` for automounting, a system administrator needs to determine the UUID and filesystem type of the partition `/dev/sdb1`. Which of the following commands provides this information most directly?
Answer: blkid /dev/sdb1
The `blkid` command is the standard utility for locating and printing block device attributes, including the UUID and filesystem TYPE, without needing the device to be mounted. `fdisk -l` shows partition information but not the filesystem UUID. `df` only works on already mounted filesystems.
Which command displays the UUID of all block devices on a RHEL system?
Answer: blkid
blkid queries and displays block device attributes including UUID, filesystem type, and label.
What does the `read` command do in a Bash script?
Answer: Reads input from stdin into a variable
The `read` command reads a line from standard input and stores it in the specified variable name.
A system administrator needs to find all files within the `/etc` directory that are owned by the `root` user and have been modified in the last 7 days. Which command will accomplish this?
Answer: find /etc -user root -mtime -7
The correct command is `find /etc -user root -mtime -7`. The `find` command searches the specified path (`/etc`). The `-user root` predicate selects files owned by 'root'. The `-mtime -7` predicate selects files whose data was modified less than 7 days ago (i.e., within the last 7 days). `-mtime +7` would find files modified more than 7 days ago, and `-mtime 7` would find files modified exactly 7 days ago.
Which command removes a stopped container named 'myapp' in Podman?
Answer: podman rm myapp
'podman rm myapp' removes a stopped container; use '-f' to force-remove a running container.
Written and edited by Nathan Beja, founder of Practice Test Geeks, with AI assistance. Exam facts are checked against the official sources linked below. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- redhat.com — Test delivery, retake policy, score release, renewal, score validity, exam information · verified Dec 2026