← All RHCSA Flashcard Decks

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
  1. Which command sets a user account to expire on December 31, 2026?

    Answer: Both B and C are correct

    Both `usermod -e` and `chage -E` accept a YYYY-MM-DD date and set the account expiration date.

  2. What is the correct way to persistently mount an ISO image file /images/rhel.iso at /mnt/iso using /etc/fstab?

    Answer: /images/rhel.iso /mnt/iso iso9660 loop,ro 0 0

    ISO images require the 'loop' mount option in fstab to attach them via the loop device, along with the iso9660 filesystem type.

  3. 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.

  4. 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.

  5. What does 'firewall-cmd --zone=public --query-service=https' return?

    Answer: yes or no indicating if the https service is currently enabled in the public zone

    --query-service returns 'yes' if the service is active in the zone at runtime, 'no' otherwise.

  6. 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).

  7. 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.

  8. 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.

  9. 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.

  10. A process with PID 1234 is unresponsive. Which signal terminates it immediately without cleanup?

    Answer: kill -9 1234

    Signal 9 (SIGKILL) cannot be caught or ignored and forces the kernel to terminate the process immediately.

  11. What command would you use to change the GID of an existing group named 'developers' to 5000?

    Answer: groupmod -g 5000 developers

    groupmod -g changes the numeric GID of an existing group.

  12. A rich rule must block all traffic from IP 203.0.113.5. Which command achieves this?

    Answer: firewall-cmd --add-rich-rule='rule family=ipv4 source address=203.0.113.5 drop' --permanent

    A rich rule with 'drop' silently discards all packets from the specified source address.

  13. 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.

  14. Which command would verify that an ACL is effectively limiting group 'interns' to read-only despite a broader ACL entry?

    Answer: getfacl file and check the effective: comment next to the group entry

    getfacl displays 'effective:' annotations showing the ACL mask's impact on each entry's actual permissions.

  15. 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.

  16. 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.

  17. Which field in /etc/shadow represents the number of days since January 1, 1970, that the password was last changed?

    Answer: Field 3

    The third field in /etc/shadow is the last password change date expressed as days since the Unix epoch (1970-01-01).

  18. Which NFS mount option ensures the client retries indefinitely if the server is unavailable at boot?

    Answer: hard

    The `hard` option causes the NFS client to keep retrying indefinitely until the server responds, preventing data corruption.

  19. After adding a new entry to /etc/fstab for a network filesystem, which systemd command reloads the fstab-generated unit files without rebooting?

    Answer: systemctl daemon-reload

    systemctl daemon-reload causes systemd to re-read and regenerate unit files, including those generated from /etc/fstab.

  20. A file is owned by user bob and group sales. User carol is not in group sales. Which minimal ACL command grants carol write access to the file?

    Answer: setfacl -m u:carol:w file

    setfacl -m u:carol:w adds a user-specific ACL entry granting write permission to carol.