Red Hat Certified Engineer Ex300 Practice Test - Set 1

Test your knowledge with this Red Hat Certified Engineer Ex300 mock exam. Get real-world IT questions and prepare for certification success.

EX300: Red Hat Certified Engineer (RHCE) - Exam Information

Exam Information

Exam Code

Red Hat Certified Engineer Ex300

Exam Title

EX300: Red Hat Certified Engineer (RHCE)

Vendor

Red Hat

Difficulty

Advanced

Duration

3.5 Hours

Question Format

Multiple Choice

Last Updated

February 23, 2025

The EX300 exam is intended for experienced Linux administrators seeking to validate their skills as a Red Hat Certified Engineer (RHCE).

Practice Test

Shop Best EX300: Red Hat Certified Engineer (RHCE) Resources Worldwide Amazon

1. Which service is used for managing SELinux policies?

semanage
firewalld
systemctl
selinuxctl

2. Which command is used to configure and manage firewall rules in RHEL 8?

firewall-cmd
iptables
nft
ufw

3. Which file stores persistent network interface configuration in RHEL?

/etc/sysconfig/network-scripts/
/etc/network/interfaces
/etc/netplan/
/etc/network.d/

4. Which command is used to troubleshoot SELinux denials?

ausearch -m AVC
dmesg | grep selinux
journalctl -u selinux
sestatus -v

5. Which command is used to set up a software RAID in Linux?

mdadm
raidctl
lvmraid
mkraid

6. Which command is used to list all SELinux booleans?

getsebool -a
seinfo -b
selinux-booleans
sestatus --booleans

7. Which tool is used to manage logical volumes in Linux?

lvcreate
vgextend
fsck
mkfs

8. Which command is used to enable a service to start on boot?

systemctl enable
service enable
chkconfig on
initctl enable

9. Which tool is used to monitor system logs in real-time?

journalctl -f
dmesg
syslogd
logread

10. Which command is used to create an LVM volume group?

vgcreate
lvcreate
mkfs.ext4
vgextend

11. Which command is used to display SELinux context of files?

ls -Z
sestatus
getsebool
semodule -l

12. Which command is used to restart the networking service in RHEL 8?

systemctl restart NetworkManager
service network restart
systemctl restart networking
networkctl restart

13. Which command is used to check active network connections?

ss -tuln
netstat -r
ip route show
ifconfig -a

14. Which command is used to create a new partition in Linux?

fdisk
mkfs.ext4
parted
pvcreate

15. Which command is used to resize a logical volume in LVM?

lvresize
vgextend
pvresize
lvextend

16. Which command is used to enable IP forwarding in Linux?

echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.forward=1
ip_forward enable
netctl forward enable

17. Which command is used to apply SELinux policies?

restorecon
chcon
semanage apply
selinuxpolicy -apply

18. Which file contains information about mounted file systems?

/etc/fstab
/etc/mtab
/proc/mounts
/var/log/mounts

19. Which command is used to check disk space usage?

df -h
du -sh
lsblk
fdisk -l

20. Which tool is used to update all installed packages in RHEL 8?

dnf update
yum update
apt upgrade
rpm -Uvh

21. Which command is used to force a user logout in Linux?

pkill -KILL -u username
killall username
logout -f username
terminate username

22. Which file is used to configure GRUB bootloader settings?

/etc/default/grub
/boot/grub.cfg
/etc/grub.conf
/boot/grub/menu.lst

23. Which command is used to verify the integrity of an RPM package?

rpm -V
dnf check
yum verify
rpm --validate

24. Which command is used to start a service in systemd?

systemctl start
service start
initctl start
runlevel start

25. Which tool is used to manage containerized applications in RHEL 8?

podman
docker
lxc
rkt

26. Configure firewalld to allow HTTP and HTTPS traffic permanently

firewall-cmd --permanent --add-service=http --add-service=https && firewall-cmd --reload
iptables -A INPUT -p tcp --dport 80,443 -j ACCEPT
echo "http https" > /etc/firewalld/allowed_services
setsebool -P httpd_can_network_connect 1

27. Create a 5GB logical volume named "data_lv" in volume group "vg_data"

lvcreate -n data_lv -L 5G vg_data
lvm create -n data_lv -s 5G -g vg_data
mkvol -n data_lv -v vg_data -s 5G
vgcreate -n data_lv -s 5G vg_data

28. Configure SELinux to allow Apache to connect to a non-standard port 8080

semanage port -a -t http_port_t -p tcp 8080
setsebool -P httpd_use_nonstandard_port 1
echo "8080 http_port_t" >> /etc/selinux/ports
chcon -t http_port_t 8080

29. Create an ext4 filesystem on /dev/vg_data/data_lv and mount it persistently at /data

mkfs.ext4 /dev/vg_data/data_lv && echo "/dev/vg_data/data_lv /data ext4 defaults 0 0" >> /etc/fstab && mount -a
format /dev/vg_data/data_lv ext4 && automount /data
newfs -t ext4 /dev/vg_data/data_lv /data
mkfs -t ext4 /dev/vg_data/data_lv && mount /dev/vg_data/data_lv /data

30. Configure NFS to share /shared with 192.168.1.0/24 with read/write access

Add "/shared 192.168.1.0/24(rw,sync)" to /etc/exports && exportfs -a
echo "192.168.1.0/24:/shared rw" > /etc/nfs.conf
nfsshare add /shared -net 192.168.1.0/24 -perm rw
share -p nfs -o rw=192.168.1.0/24 /shared

31. Configure a cron job that runs /usr/local/bin/backup.sh every Sunday at 3 AM

crontab -e then add "0 3 * * 0 /usr/local/bin/backup.sh"
echo "0 3 * * 0 /usr/local/bin/backup.sh" >> /etc/crontab
addcron -d sunday -h 3 /usr/local/bin/backup.sh
schedule -t weekly -d 0 -h 3 /usr/local/bin/backup.sh

32. Configure the system to use 192.168.1.1 as its default gateway

ip route add default via 192.168.1.1
route add default gw 192.168.1.1
echo "GATEWAY=192.168.1.1" >> /etc/sysconfig/network
netconfig set gateway 192.168.1.1

33. Create a VDO volume named "vdo1" with 50GB physical size and 100GB logical size

vdo create --name=vdo1 --device=/dev/sdb --vdoLogicalSize=100G
mkvdo -n vdo1 -d /dev/sdb -p 50G -l 100G
vdocreate vdo1 /dev/sdb 50G 100G
createvdo --name vdo1 --size 50G --logical 100G

34. Configure a systemd service that restarts automatically if it fails

Add "Restart=on-failure" to the [Service] section in the unit file
systemctl enable autorestart servicename
echo "autorestart=true" >> /etc/systemd/service.conf
servicecfg set servicename autorestart=on

35. Configure a user "admin" to have passwordless sudo access

Add "admin ALL=(ALL) NOPASSWD:ALL" to /etc/sudoers
usermod -aG wheel admin
echo "admin" >> /etc/sudoers.nopasswd
setpriv admin +sudo-nopasswd

36. Configure a MariaDB database to listen on port 3307 instead of 3306

Edit /etc/my.cnf.d/mariadb-server.cnf and add "port = 3307" under [mysqld] section
mysqladmin --port=3307
setsebool -P mysql_port_3307=1
echo "3307" > /etc/mysql/port

37. Configure a Podman container to run Nginx on host port 8080

podman run -d --name nginx -p 8080:80 nginx
container start nginx -p 8080:80
podman create -e PORT=8080 nginx
docker run -p 8080 nginx

38. Configure a custom SELinux policy to allow Apache to write to /var/www/html/uploads

semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/uploads(/.*)?" && restorecon -Rv /var/www/html/uploads
chcon -t httpd_sys_content_t /var/www/html/uploads
setsebool -P httpd_write_content 1
selinux allow httpd /var/www/html/uploads w

39. Configure a RAID 1 array using /dev/sdc and /dev/sdd

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdc /dev/sdd
raidcreate /dev/md0 raid1 /dev/sdc /dev/sdd
mkraid /dev/md0 -l 1 -d /dev/sdc /dev/sdd
mdadm -C /dev/md0 -n 2 -l mirror /dev/sdc /dev/sdd

40. Configure the system to log all failed SSH login attempts to /var/log/ssh_fails.log

Add "auth.* /var/log/ssh_fails.log" to /etc/rsyslog.conf and restart rsyslog
echo "LogLevel VERBOSE" >> /etc/ssh/sshd_config
auditctl -w /usr/sbin/sshd -p wa -k sshd_logins
Add "session required pam_faillog.so silent audit deny=3" to /etc/pam.d/sshd

41. Configure a systemd timer that runs /usr/local/bin/backup.sh daily at 2 AM

Create a .timer unit with OnCalendar=daily 02:00:00 and associate with a .service file
echo "0 2 * * * /usr/local/bin/backup.sh" > /etc/cron.d/backup
systemd-timer create --name=backup --on-calendar="02:00:00"
timed --add-job --command="/usr/local/bin/backup.sh" --daily --at=2am

42. Configure a network bond using interfaces eth0 and eth1 with mode 802.3ad

Create bond0 config in /etc/sysconfig/network-scripts/ with BONDING_OPTS="mode=4"
nmcli con add type bond ifname bond0 mode 802.3ad
ifenslave bond0 eth0 eth1
bondcreate --name=bond0 --mode=802.3ad eth0 eth1

43. Configure a Kerberos-authenticated NFSv4 share

Add "sec=krb5p" to the export options in /etc/exports and configure Kerberos principals
nfssec --enable kerberos
authconfig --enablenfsv4krb5 --update
echo "AUTH_GSS" > /etc/nfs.conf

The Red Hat Certified Engineer Ex300 certification is a globally recognized credential for IT professionals. This practice test helps you prepare by covering key topics like hardware, networking, troubleshooting, and security.

Want more practice? Check out our other mock exams:

© 2025 ITCertRocket.com - Hands-On IT Lab Exercises & Certification Prep. All rights reserved.