RHCE Cheat Sheet 2026
The 30 highest-yield RHCE facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.
60 questions
90 min time limit
70.00% to pass
- What command builds a container image from a `Containerfile` in the current directory? → podman build -t myimage .
- Which systemd command shows the output (logs) of a timer-triggered service? → journalctl -u myservice.service
- What command syntax is used to perform a dry run (check mode) of an Ansible playbook without making changes? → ansible-playbook -C playbook.yml
- Which command cleans all cached DNF package data, metadata, and headers from the local cache? → dnf clean all
- How do you save the output from an Ansible module to a variable? → register: var_name
- What is a Pod in the context of Podman? → A group of containers sharing network and IPC namespaces
- What log file contains SELinux denial messages (AVC denials)? → /var/log/audit/audit.log
- Which bash construct tests if a variable `$FILE` exists as a regular file? → if [ -f $FILE ]
- What is the Samba directive that limits access to systems on the example.org network? → hosts allow .example.org
- Which command loads a compiled SELinux policy module named `mypolicy.pp`? → semodule -i mypolicy.pp
- What command syntax is used to perform a syntax check on an Ansible playbook? → ansible-playbook --syntax-check playbook.yml
- Which command generates a systemd unit file to run a Podman container as a service? → podman generate systemd mycontainer
- What is the relevant SELinux boolean associated with the sharing of home directories on Samba? → samba_enable_home_dirs
- What DNF command lists all currently installed packages on the system? → dnf list installed
- Which command locks a user account to prevent login? → Both A and B
- Which command forces user `jdoe` to change their password on next login? → passwd -e jdoe
- (SHELL) How do you tell if a file is of a certain type? → test -f /var/cache/man/whatis
- What mount option in `/etc/fstab` causes a file system to be mounted read-only? → ro
- What is the SELinux file type appropriate for shared Samba directories? → samba_share_t
- What is the purpose of the `/etc/cron.deny` file? → Lists users who are NOT allowed to use crontab
- Which option in `mkfs.xfs` sets a label for a new XFS file system? → -L
- What command generates an SELinux policy module from audit denials to allow a previously blocked action? → audit2allow -M mypolicy
- What keyword is used for looping over a list (which can be a variable) in Ansible? → loop
- How do you check whether a downloaded RPM file's signature is valid before installing it? → Both B and C are correct
- Which command removes the 'vsftpd' package along with any packages that depend on it? → dnf remove vsftpd
- What field in `/etc/passwd` specifies the user's default shell? → 7th field
- What does the `id` command display when run as a normal user? → UID, GID, and group memberships
- What is the purpose of `skopeo` in a RHEL container workflow? → Inspects and copies container images between registries without running them
- Which configurations in ansible.cfg are used for privilege escalation? → become, become_method, become_user, become_ask_pass
- Which Ansible module is used for creating and editing filesystems? → mount
Turn these facts into recall: