RHCSA Engineer Interview Questions with Answers [2025]
Prepare for RHCSA interviews with 103 scenario-based questions for 2025, tailored for freshers and experienced professionals. Covering system configuration, user management, file systems, networking, security, automation, and troubleshooting, this guide aligns with RHCSA certification exam questions with answers 2025. Master RHCSA Linux system administration interview questions 2025, focusing on RHEL, Podman, Ansible, and cloud integration. Practice RHCSA practical exam preparation interview questions 2025 to excel in enterprise environments, ensuring success in competitive IT and DevOps roles with hands-on solutions for real-world Linux challenges.
![RHCSA Engineer Interview Questions with Answers [2025]](https://www.devopstraininginstitute.com/blog/uploads/images/202509/image_870x_68b966521f860.jpg)
Core Linux and RHCSA Concepts
1. What is the RHCSA certification, and why is it valuable in 2025?
RHCSA (Red Hat Certified System Administrator) validates skills in managing RHEL systems, including user management, storage, networking, and security. Valuable for enterprise roles due to RHEL’s dominance in server environments and demand for automation expertise.
2. What is the role of the Linux kernel in RHEL?
The kernel manages hardware, processes, and system calls. In RHEL, it’s optimized for enterprise stability (e.g., 5.14.0-70.el9). Check: uname -r.
3. How do you identify the RHEL version?
Run cat /etc/redhat-release (e.g., Red Hat Enterprise Linux 9.2). Alternatively: lsb_release -a or cat /etc/os-release.
4. What is the difference between RHEL and CentOS Stream?
-
RHEL: Stable, enterprise-supported, subscription-based.
-
CentOS Stream: Rolling release, upstream for RHEL, free.
RHEL is preferred for production; CentOS Stream for testing.
5. What is a shell, and why is Bash used in RHEL?
A shell interprets commands. Bash is default in RHEL for its scripting power and compatibility with automation tools. Example: bash -c "uptime".
6. What is the /etc directory in RHEL?
Stores configuration files (e.g., /etc/passwd, /etc/yum.repos.d). Critical for system and service customization.
7. How does RHEL handle process scheduling?
Uses the Completely Fair Scheduler (CFS). Adjust priorities with nice (e.g., nice -n 10 backup.sh) or chrt for real-time tasks.
8. What is the root user, and how is it secured in RHEL?
Root (UID 0) has full access. Secured via sudo, disabling SSH root login (PermitRootLogin no in /etc/ssh/sshd_config), and key-based authentication.
9. What is the /proc filesystem used for?
Virtual filesystem with runtime data (e.g., /proc/meminfo for memory). Used for monitoring system resources.
10. What is systemd in RHEL?
Manages services, logging, and boot processes. Example: systemctl start httpd starts Apache. Check: systemctl status httpd.
File System and Storage Management
11. What is the Filesystem Hierarchy Standard (FHS) in RHEL?
Defines directories: /bin (binaries), /var (logs), /home (user data). Ensures consistency for RHEL administration.
12. What are common filesystems supported by RHEL?
-
ext4: Reliable, general-purpose.
-
XFS: Default in RHEL, high-performance for large files.
-
Btrfs: Snapshots, used for backups.
Example: XFS for database servers.
13. How do you check disk space in RHEL?
-
df -h: Filesystem usage (e.g., /dev/sda1: 50G used).
-
du -sh /path: Directory usage.
Verify storage capacity.
14. How do you create an LVM volume in RHEL?
pvcreate /dev/sdb
vgcreate vg_data /dev/sdb
lvcreate -L 20G -n lv_data vg_data
mkfs.xfs /dev/vg_data/lv_data
Mount: mount /dev/vg_data/lv_data /mnt. Verify: lvs.
15. How do you extend an LVM logical volume?
lvextend -L +10G /dev/vg_data/lv_data
xfs_growfs /mnt
Adds 10GB. Verify: df -h /mnt.
16. What is the difference between a hard link and a soft link?
-
Hard Link: Shares inode (e.g., ln file1 file2).
-
Soft Link: Points to path (e.g., ln -s file1 link1).
Hard links survive original deletion; soft links break.
17. How do you repair a corrupted XFS filesystem?
Unmount: umount /mnt, run: xfs_repair /dev/sda1. Backup first. Verify: mount.
18. What is the /mnt directory in RHEL?
Temporary mount point for filesystems (e.g., mount /dev/sdb1 /mnt). Use /etc/fstab for permanent mounts.
19. How do you configure swap space in RHEL?
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Add to /etc/fstab: /swapfile swap swap defaults 0 0. Verify: swapon --show.
20. How do you set up a RAID 1 array in RHEL?
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mkfs.xfs /dev/md0
Verify: cat /proc/mdstat.
System Administration
21. How do you check system uptime in RHEL?
uptime
Shows 7 days, 3:45. Tracks server reliability.
22. What is the /etc/passwd file in RHEL?
Stores user details (e.g., user:x:1000:1000:/home/user:/bin/bash). Edited via useradd or usermod.
23. How do you create a user in RHEL?
useradd -m -s /bin/bash appuser
passwd appuser
Verify: id appuser.
24. How do you change file permissions in RHEL?
chmod 640 file # Owner: rw, group: r
chmod u+x script.sh # Add execute for owner
Verify: ls -l.
25. What is umask in RHEL?
Sets default permissions (e.g., umask 022 creates files as 644, dirs as 755). Configure in /etc/profile.
26. How do you manage services with systemctl?
-
Start: systemctl start httpd.
-
Enable: systemctl enable httpd.
-
Status: systemctl status httpd.
Example: systemctl restart sshd.
27. How do you schedule a task with crond?
Edit /etc/crontab or crontab -e:
0 1 * * * /backup.sh
Runs daily at 1 AM. Verify: crontab -l.
28. What is the /var/log directory?
Stores logs (e.g., /var/log/messages, /var/log/secure). Used for troubleshooting services.
29. How do you terminate a process in RHEL?
Find PID: ps aux | grep process, kill: kill -9 <PID>. Example: kill -9 1234. Verify: ps.
30. What is tuned in RHEL?
Optimizes system performance. Example:
tuned-adm profile throughput-performance
Sets high-performance profile. Verify: tuned-adm active.
Networking
31. How do you configure a static IP in RHEL?
Edit /etc/sysconfig/network-scripts/ifcfg-enp0s3:
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
Restart: nmcli con reload. Verify: ip addr.
32. What is /etc/hosts in RHEL?
Maps IPs to hostnames (e.g., 192.168.1.10 server.local). Used for local DNS resolution.
33. How do you troubleshoot network connectivity?
-
Check interface: ip link.
-
Test: ping 8.8.8.8.
-
DNS: nslookup google.com.
-
Ports: ss -tuln.
Fix issues like missing DNS1 in ifcfg-enp0s3.
34. How do you configure firewalld in RHEL?
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
Opens HTTP port. Verify: firewall-cmd --list-all.
35. How do you secure SSH in RHEL?
Edit /etc/ssh/sshd_config:
-
Port 2222
-
PermitRootLogin no
-
PasswordAuthentication no
Copy keys: ssh-copy-id. Restart: systemctl restart sshd.
36. What is nmcli in RHEL?
Manages NetworkManager. Example:
nmcli con mod enp0s3 ipv4.addresses 192.168.1.100/24
nmcli con up enp0s3
Verify: nmcli con show.
37. How do you set up a network bond in RHEL?
Create /etc/sysconfig/network-scripts/ifcfg-bond0:
DEVICE=bond0
BONDING_OPTS="mode=4 miimon=100"
IPADDR=192.168.1.100
NETMASK=255.255.255.0
Add slaves: ifcfg-enp0s3, ifcfg-enp0s4. Restart: systemctl restart network.
38. What is /etc/resolv.conf in RHEL?
Lists DNS servers (e.g., nameserver 8.8.8.8). Managed by NetworkManager. Verify: dig google.com.
39. How do you monitor network traffic?
-
nload enp0s3: Real-time bandwidth.
-
tcpdump -i enp0s3: Packet capture.
Example: nload for server traffic.
40. What is iptables vs. nftables in RHEL?
-
iptables: Legacy firewall, table-based.
-
nftables: Modern, unified, replacing iptables in RHEL 9.
Example: nft add rule ip filter INPUT tcp dport 22 accept.
Security
41. What is SELinux, and why is it critical in RHEL?
SELinux enforces mandatory access controls via policies, enhancing security. Example: setsebool -P httpd_can_network_connect 1 allows Apache networking. Check: getenforce.
42. How do you manage SELinux contexts for a file?
Set context:
semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
restorecon -R /web
Allows Apache to access /web. Verify: ls -Z.
43. How do you implement two-factor authentication for SSH?
Install: dnf install google-authenticator. Run: google-authenticator. Edit /etc/pam.d/sshd:
auth required pam_google_authenticator.so
Update /etc/ssh/sshd_config: ChallengeResponseAuthentication yes. Restart: systemctl restart sshd.
44. How do you configure firewalld zones?
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
Verify: firewall-cmd --get-active-zones.
45. What is auditd in RHEL?
Logs security events. Configure /etc/audit/audit.rules:
-w /etc/passwd -p wa -k passwd_changes
Check: ausearch -k passwd_changes.
46. How do you restrict SSH access by IP?
Edit /etc/ssh/sshd_config:
ListenAddress 192.168.1.100
Or firewalld: firewall-cmd --permanent --add-source=192.168.1.0/24. Restart: systemctl restart sshd.
47. What is the /etc/sudoers file, and how do you edit it?
Grants sudo privileges. Edit: visudo. Example:
appuser ALL=(ALL) /usr/bin/dnf
Allows appuser to run dnf. Verify: sudo -l.
48. How do you enforce password policies in RHEL?
Edit /etc/security/pwquality.conf:
minlen = 8
dcredit = -1
Requires 8 characters, one digit. Verify: chage -l user1.
49. What is fail2ban for security?
Blocks IPs after failed logins. Install: dnf install fail2ban. Configure /etc/fail2ban/jail.local:
[sshd]
enabled = true
maxretry = 3
Restart: systemctl restart fail2ban.
50. How do you check for open ports in RHEL?
ss -tuln
Lists listening ports (e.g., 0.0.0.0:22). Alternative: nmap localhost.
Performance and Monitoring
51. How do you monitor CPU and memory in RHEL?
-
top/htop: Real-time stats.
-
free -h: Memory usage (e.g., used: 4G).
Install htop: dnf install htop.
52. What is sar for performance monitoring?
Collects system stats. Example: sar -u 1 5 shows CPU usage. Install: dnf install sysstat.
53. How do you check disk I/O performance?
iostat -x 1 5
High %iowait indicates bottlenecks. Install: dnf install sysstat.
54. What is vmstat in RHEL?
Reports CPU, memory, I/O. Example: vmstat 1 5 shows stats every second. High si/so indicates swapping.
55. How do you analyze logs with journalctl?
-
journalctl -u httpd: Apache logs.
-
journalctl -p 3: Error logs.
-
journalctl -f: Real-time logs.
56. What is tuned-adm for optimization?
Manages performance profiles. Example:
tuned-adm profile latency-performance
Optimizes for low latency. Verify: tuned-adm active.
57. How do you monitor network usage?
-
nload: Real-time bandwidth.
-
iftop: Per-connection stats.
Example: iftop -i enp0s3.
58. What is glances?
All-in-one monitoring tool. Install: dnf install glances. Run: glances.
59. How do you identify a high-CPU process?
ps aux --sort=-%cpu | head
Debug with strace -p <PID>.
60. What is lscpu?
Shows CPU details (e.g., cores, architecture). Example: lscpu for performance tuning.
Shell Scripting and Automation
61. How do you write a Bash script to check service status?
#!/bin/bash
if systemctl is-active httpd; then
echo "httpd is running"
else
systemctl start httpd
fi
Run: bash script.sh.
62. What is a shebang line?
Specifies interpreter (e.g., #!/bin/bash). Ensures correct shell execution.
63. How do you pass arguments to a script?
#!/bin/bash
echo "Service: $1"
Run: ./script.sh httpd.
64. What is sed in scripting?
Edits text streams. Example: sed 's/error/warning/g' /var/log/messages replaces “error” with “warning”.
65. How do you use awk for log parsing?
awk '/error/ {print $1}' /var/log/messages
Prints first column of error lines.
66. What is xargs?
Passes piped input as arguments. Example: find /tmp -name "*.log" | xargs rm deletes logs.
67. How do you schedule a script in RHEL?
Edit crontab -e:
0 3 * * * /script.sh
Runs at 3 AM. Verify: crontab -l.
68. What is a trap in Bash?
Handles signals. Example:
trap 'echo "Script stopped"; exit' INT
Cleans up on Ctrl+C.
69. How do you debug a script?
Run: bash -x script.sh or add set -x in script. Shows executed commands.
70. What is Ansible in RHEL environments?
Automates tasks. Example playbook:
- hosts: servers
tasks:
- name: Install httpd
dnf: name=httpd state=present
Package Management
71. What is dnf in RHEL?
Package manager replacing yum. Example: dnf install httpd. Faster dependency resolution.
72. How do you search for a package?
dnf search httpd
Lists matching packages.
73. How do you remove a package?
dnf remove httpd
Verify: rpm -q httpd.
74. What is yum vs. dnf?
-
yum: Legacy, slower.
-
dnf: Modern, default in RHEL 8/9, better performance.
Example: dnf update.
75. How do you add a repository in RHEL?
Create /etc/yum.repos.d/custom.repo:
[custom]
baseurl=http://repo.url
gpgcheck=0
Update: dnf repolist.
76. How do you install a specific package version?
dnf install httpd-2.4.46
Verify: rpm -q httpd.
77. What is rpm?
Manages .rpm packages. Example: rpm -ivh package.rpm installs, rpm -qa lists installed packages.
78. How do you clean up unused packages?
dnf autoremove
Frees disk space.
79. What is subscription-manager in RHEL?
Manages subscriptions for updates. Example:
subscription-manager register
subscription-manager attach --auto
Verify: subscription-manager status.
80. How do you verify a package’s integrity?
rpm -V httpd
Checks file changes since installation.
Backup and Recovery
81. How do you back up a directory in RHEL?
tar -czf /backup/data.tar.gz /data
Restore: tar -xzf data.tar.gz -C /restore.
82. What is rsync for backups?
Synchronizes files. Example:
rsync -av --delete /data /backup
Mirrors /data to /backup.
83. How do you recover a corrupted GRUB in RHEL?
Boot live CD, chroot:
mount /dev/sda1 /mnt
chroot /mnt
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
84. What is rear for disaster recovery?
Relaxed Recovery creates bootable backups. Example:
rear mkbackup
Restore: rear recover.
85. How do you back up a database in RHEL?
MySQL: mysqldump -u root -p db > backup.sql.
Restore: mysql -u root -p db < backup.sql.
86. How do you create an LVM snapshot?
lvcreate -s -n snap -L 5G /dev/vg_data/lv_data
Backup, then remove: lvremove. Verify: lvs.
87. What is dd for backups?
Copies raw data. Example:
dd if=/dev/sda of=/backup/disk.img bs=64K
Restore: dd if=/backup/disk.img of=/dev/sda.
88. How do you automate backups in RHEL?
Script:
#!/bin/bash
rsync -av /data /backup/$(date +%F)
Schedule: crontab -e, 0 1 * * * /backup.sh.
89. How do you fix a corrupted /etc/fstab?
Boot live CD, mount: mount /dev/sda1 /mnt, edit /mnt/etc/fstab, test: mount -a.
90. What is logrotate in RHEL?
Manages logs. Example /etc/logrotate.d/httpd:
/var/log/httpd/*.log {
daily
rotate 7
compress
}
Run: logrotate -f /etc/logrotate.conf.
Troubleshooting and Diagnostics
91. How do you troubleshoot a system that won’t boot?
Boot live CD, check:
-
Logs: cat /mnt/var/log/messages.
-
Filesystem: fsck /dev/sda1.
-
GRUB: grub2-install.
Fix /etc/fstab if needed.
92. What is dmesg in RHEL?
Shows kernel logs. Example: dmesg | grep -i error finds hardware issues.
93. How do you troubleshoot a network issue?
-
Check interface: ip link.
-
Test: ping 8.8.8.8.
-
DNS: nslookup google.com.
-
Firewall: firewall-cmd --list-all.
94. What is strace for debugging?
Traces system calls. Example: strace -p 1234 diagnoses process hangs.
95. How do you troubleshoot a failed service?
Check: systemctl status httpd. Logs: journalctl -u httpd. Restart: systemctl restart httpd.
96. What is lsof in RHEL?
Lists open files/sockets. Example: lsof -i :80 shows processes using port 80.
97. How do you recover a deleted file in use?
Find: lsof | grep file, copy: cp /proc/<PID>/fd/<fd> /restore/file.
98. What is sosreport?
Collects system diagnostics for support. Example:
sosreport
Generates a tarball with logs and configs.
99. How do you check disk errors?
smartctl -a /dev/sda
Checks SMART data (e.g., Reallocated_Sector_Ct). Install: dnf install smartmontools.
100. What is journalctl for troubleshooting?
Queries systemd logs. Example: journalctl -u sshd -b shows SSH logs since boot.
RHCSA-Specific Skills
101. What are key RHCSA exam objectives for 2025?
-
User Management: useradd, sudoers.
-
Storage: LVM, XFS, RAID.
-
Networking: nmcli, firewalld.
-
Security: SELinux, SSH hardening.
-
Automation: Bash scripting, cron.
102. How do you prepare for RHCSA performance-based tasks?
-
Labs: Use RHEL trial, VirtualBox, or AWS to practice tasks like LVM or SELinux.
-
Commands: Master systemctl, nmcli, semanage.
-
Scenarios: Simulate failures (e.g., GRUB, network).
-
Time Management: Practice tasks under 2-3 hour constraints.
-
Resources: Use Red Hat’s EX200 objectives and practice exams.
103. What distinguishes an RHCSA engineer in 2025?
-
Practical Skills: Configure LVM, firewalld, SELinux under time pressure.
-
Automation: Write scripts for monitoring or backups.
-
Security: Implement SELinux and SSH hardening.
-
Troubleshooting: Diagnose boot or network issues efficiently.
-
Cloud Integration: Familiarity with RHEL in AWS or Azure.
Tips to Ace RHCSA Interviews
-
Hands-On Labs: Practice in RHEL environments to master commands like nmcli or semanage.
-
Scripting: Automate tasks (e.g., backups, service checks) with Bash.
-
Explain Clearly: Describe processes like LVM resizing or SELinux contexts simply.
-
Stay Updated: Understand 2025 trends like Podman, cloud-native RHEL, and automation.
-
Certifications: Highlight RHCSA (EX200) or RHCE for advanced roles.
-
Mock Exams: Simulate performance-based tasks to build confidence.
What's Your Reaction?






