Top 50 RHEL Interview Questions and Answers

Top 50 RHEL Interview Questions & Answers Guide 2025

Top 50 RHEL Interview Questions and Answers: Your Ultimate Guide

Are you preparing for a Red Hat Enterprise Linux (RHEL) administration or engineering interview? This comprehensive study guide provides a curated list of the top 50 RHEL interview questions and answers, designed to test your knowledge from fundamental concepts to advanced troubleshooting. Whether you're a beginner seeking an entry-level position or an experienced professional aiming for a senior role, mastering these questions will significantly boost your confidence and readiness for success in the competitive Linux job market.

Table of Contents

  1. Introduction to RHEL & Core Concepts
  2. File System & Directory Management
  3. User, Group, & Permissions Management
  4. Process Management & System Services
  5. Package Management with YUM/DNF
  6. Networking Configuration & Troubleshooting
  7. Storage Management & LVM
  8. Security & System Hardening
  9. Advanced Topics & Troubleshooting
  10. Frequently Asked Questions (FAQ)
  11. Further Reading

Introduction to RHEL & Core Concepts

Understanding the foundational aspects of Red Hat Enterprise Linux is crucial. These questions cover what RHEL is, its distinguishing features, and core architectural components. Interviewers often start here to gauge your basic familiarity.

Q1: What is RHEL and what are its key features?

RHEL stands for Red Hat Enterprise Linux. It is a commercial open-source Linux distribution developed by Red Hat. Key features include enterprise-grade stability, long-term support, certifications for various hardware and software vendors, strong security features, and a robust ecosystem of tools and services.

Q2: How does RHEL differ from CentOS?

Historically, CentOS was a community-driven, downstream rebuild of RHEL, offering a free alternative with binary compatibility. The main difference was commercial support and branding. With CentOS Stream, it's now an upstream development branch for RHEL, meaning RHEL is derived from CentOS Stream.

Q3: Explain the Linux kernel.

The Linux kernel is the core of the operating system. It manages system resources, handles communication between hardware and software, and provides essential services like memory management, process scheduling, and device drivers.

Q4: What is a shell in RHEL? Name some common shells.

A shell is a command-line interpreter that provides a user interface for interacting with the operating system. It executes commands, scripts, and provides features like command history and tab completion. Common shells include Bash (Bourne Again Shell), Zsh, Ksh, and Sh.

Q5: How do you check the RHEL version?

You can check the RHEL version using several commands. Common methods include cat /etc/redhat-release or hostnamectl.


cat /etc/redhat-release
hostnamectl
    

File System & Directory Management

A strong grasp of the RHEL file system hierarchy and basic file operations is essential for any administrator. These questions delve into managing files, directories, and understanding disk usage.

Q6: Explain the Linux file system hierarchy (FHS).

The File System Hierarchy Standard (FHS) defines the structure of directories and their contents in Linux. Key directories include / (root), /bin (essential binaries), /etc (configuration files), /home (user home directories), /var (variable data), and /usr (user programs).

Q7: How do you find a file or directory in RHEL?

The find command is powerful for locating files and directories. For example, to find all files named myconfig.conf in the /etc directory:


find /etc -name myconfig.conf
    

The locate command can also be used, but it relies on a pre-built database which needs to be updated.

Q8: What is the difference between a symbolic link and a hard link?

A symbolic link (symlink or soft link) is a pointer to a file or directory; it can span file systems and its deletion doesn't affect the original. A hard link is an additional directory entry for a file; it must reside on the same file system, shares the same inode number, and the file data is only removed when all hard links are deleted.

Q9: How do you check disk space usage in RHEL?

Use the df command for overall disk usage and du for directory-specific usage.


df -h  # Human-readable disk free
du -sh /var/log # Summarized human-readable usage of /var/log
    

Q10: What is an inode?

An inode is a data structure in a Unix-style file system that describes a file system object, such as a file or a directory. It stores metadata about the file, including its type, permissions, owner, group, size, and physical location on disk, but not its name.

User, Group, & Permissions Management

Security and access control are fundamental in RHEL. These questions assess your understanding of how to manage users, groups, and file permissions effectively.

Q11: How do you create a new user in RHEL?

Use the useradd command to create a new user account. For example, to create a user named johndoe:


sudo useradd johndoe
sudo passwd johndoe # Set password for the new user
    

Q12: Explain the significance of /etc/passwd and /etc/shadow files.

The /etc/passwd file stores essential user account information (username, UID, GID, home directory, shell) but not passwords. The /etc/shadow file stores encrypted passwords and password aging information, accessible only by root, providing enhanced security.

Q13: What are file permissions in RHEL and how do you change them?

File permissions define who can read, write, or execute a file or directory. They are represented by three sets: owner, group, and others (e.g., rwx r-x r--). Use the chmod command to change permissions.


chmod 755 myfile.sh # Owner: rwx, Group: r-x, Others: r-x
chmod +x myscript.py # Add execute permission for all
    

Q14: How do you add a user to a supplementary group?

Use the usermod -aG command to add a user to a supplementary group. The -a flag ensures the user is appended to the group, not replacing existing groups.


sudo usermod -aG developers johndoe
    

Q15: What is sudo and how do you configure it?

sudo (superuser do) allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. Configuration is done via the /etc/sudoers file, typically edited with the visudo command to prevent syntax errors.

Process Management & System Services

Efficiently managing processes and system services is a core task for any RHEL administrator. These questions cover monitoring, controlling, and understanding system operations.

Q16: How do you list all running processes in RHEL?

The ps command lists processes. For a comprehensive list, use ps aux or ps -ef. The top command provides a dynamic, real-time view of running processes and system resource usage.


ps aux
top
    

Q17: How do you terminate a running process?

Use the kill command with the process ID (PID). For a graceful termination, use kill <PID> (sends SIGTERM). For a forceful termination, use kill -9 <PID> (sends SIGKILL).


kill 12345
kill -9 12345
    

Q18: What is systemd and how does it work?

systemd is the default init system and service manager in modern RHEL versions. It initializes the system, manages services, logs system events, and provides process supervision. It uses "units" to define services, mount points, devices, and other system objects.

Q19: How do you start, stop, and enable a system service?

Use the systemctl command for managing services.


sudo systemctl start httpd # Start the Apache web server
sudo systemctl stop httpd  # Stop the Apache web server
sudo systemctl enable httpd # Enable httpd to start on boot
sudo systemctl disable httpd # Disable httpd from starting on boot
sudo systemctl status httpd # Check status of httpd
    

Q20: What is a runlevel (or target) in RHEL?

In older SysVinit systems, runlevels defined the system's operational state (e.g., 0 for halt, 3 for multi-user CLI, 5 for multi-user GUI). With systemd, these are replaced by targets, which serve a similar purpose (e.g., multi-user.target, graphical.target).

Package Management with YUM/DNF

RHEL relies on powerful package managers to install, update, and remove software. These questions focus on your ability to handle software packages efficiently.

Q21: What are YUM and DNF?

YUM (Yellowdog Updater, Modified) and DNF (Dandified YUM) are package managers used in RHEL. DNF is the next-generation version of YUM, offering better performance, dependency resolution, and a cleaner API. DNF is the default from RHEL 8 onwards.

Q22: How do you install a package using DNF?

To install a package, use the dnf install command.


sudo dnf install httpd
    

Q23: How do you update all installed packages on a RHEL system?

Use sudo dnf update (or sudo yum update for older RHEL versions). This command downloads and installs available updates for all currently installed packages.

Q24: What is an RPM package?

RPM (Red Hat Package Manager) is the fundamental package format for RHEL. An RPM package is an archive file containing all the necessary files, metadata, and instructions for a particular piece of software to be installed on a RHEL-based system.

Q25: How do you list all installed RPM packages?

Use the rpm -qa command to query all installed RPM packages. You can combine it with grep to find specific packages.


rpm -qa | grep httpd
    

Networking Configuration & Troubleshooting

Network connectivity is critical for any server. These questions test your knowledge of RHEL networking fundamentals, configuration, and basic troubleshooting techniques.

Q26: How do you configure a static IP address in RHEL?

You can configure a static IP address using nmcli or by editing network configuration files in /etc/sysconfig/network-scripts/ (for older RHEL) or NetworkManager profiles.


# Example using nmcli
sudo nmcli connection modify enp0s3 ipv4.addresses 192.168.1.100/24
sudo nmcli connection modify enp0s3 ipv4.gateway 192.168.1.1
sudo nmcli connection modify enp0s3 ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection modify enp0s3 ipv4.method manual
sudo nmcli connection up enp0s3
    

Q27: How do you check network interface status and IP addresses?

Use the ip addr show or nmcli device show commands.


ip addr show
nmcli device show enp0s3
    

Q28: Explain the role of firewalld.

firewalld is the default firewall management utility in RHEL. It uses zones to define trust levels for network connections and allows dynamic updates without restarting the firewall service. It manages rules for IP tables.

Q29: How do you open a specific port in firewalld?

To open a port (e.g., port 80 for HTTP) permanently in the public zone:


sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload
    

Q30: How do you test network connectivity to another host?

The ping command is used to test reachability. traceroute (or tracepath) shows the path packets take, and netcat (nc) can be used to test specific ports.


ping google.com
traceroute 8.8.8.8
nc -vz server.example.com 22 # Check if port 22 is open
    

Storage Management & LVM

Managing disk space, partitions, and logical volumes is a critical skill. These questions explore your understanding of RHEL's storage capabilities, including LVM.

Q31: What is LVM and why is it used?

LVM (Logical Volume Manager) provides a more flexible way to manage disk space than traditional partitioning. It allows for dynamic resizing of logical volumes, creating snapshots, and combining multiple physical disks into a single storage pool. It simplifies storage administration and improves flexibility.

Q32: Explain the key components of LVM.

LVM consists of three main components:

  • Physical Volumes (PVs): Physical hard drives or partitions.
  • Volume Groups (VGs): Collections of one or more PVs.
  • Logical Volumes (LVs): Created from VGs, which are then formatted with a filesystem and mounted.

Q33: How do you create a new logical volume in RHEL?

The process involves:

  1. Creating physical volumes: pvcreate /dev/sdb1
  2. Creating a volume group: vgcreate myvg /dev/sdb1
  3. Creating a logical volume: lvcreate -L 10G -n mylv myvg
  4. Formatting the LV: mkfs.xfs /dev/myvg/mylv
  5. Mounting the LV: mount /dev/myvg/mylv /mnt/data

Q34: How do you extend an existing logical volume?

To extend an LV, first ensure the VG has enough free space or extend the VG by adding another PV. Then use lvextend to extend the LV, and finally, resize the filesystem using xfs_growfs (for XFS) or resize2fs (for Ext4).


sudo lvextend -L +5G /dev/myvg/mylv
sudo xfs_growfs /mnt/data # Or resize2fs /dev/myvg/mylv
    

Q35: What is the purpose of the /etc/fstab file?

The /etc/fstab file (file system table) defines static information about the file systems. It lists which file systems are to be mounted automatically at boot time, their mount points, file system type, and mount options.

Security & System Hardening

Security is paramount in any enterprise environment. These questions cover RHEL's built-in security features and best practices for hardening your system.

Q36: What is SELinux and how does it enhance security?

SELinux (Security-Enhanced Linux) is a mandatory access control (MAC) system. It provides an additional layer of security beyond traditional discretionary access control (DAC). SELinux enforces security policies that restrict processes and users, even root, from accessing resources they don't explicitly have permission for, significantly reducing the impact of security vulnerabilities.

Q37: How do you check and change SELinux status?

Use sestatus to check the current SELinux status (enforcing, permissive, disabled). To temporarily change modes, use setenforce 0 (permissive) or setenforce 1 (enforcing). To permanently change, edit /etc/selinux/config.


sestatus
sudo setenforce 0 # Switch to permissive mode temporarily
    

Q38: How do you harden SSH access on a RHEL server?

Key steps include:

  • Disable root login: PermitRootLogin no in /etc/ssh/sshd_config.
  • Use key-based authentication: Disable password authentication.
  • Change default SSH port: Port 2222 (use a non-standard port).
  • Limit users/groups: Use AllowUsers or AllowGroups.
  • Implement strong password policies.

Q39: Where are system logs stored in RHEL?

System logs are primarily managed by systemd-journald and stored in the journal. They can be viewed using journalctl. Traditional log files are often found in /var/log/, such as /var/log/messages, /var/log/secure, and application-specific logs.

Q40: What are cron jobs and how are they used for automation?

Cron jobs are scheduled tasks that run automatically at specified intervals. They are used for automation, such as backups, log rotation, system maintenance, and running custom scripts. Tasks are defined in crontab entries, either per-user or system-wide (e.g., /etc/crontab, /etc/cron.d/).

Advanced Topics & Troubleshooting

Beyond daily administration, RHEL interviewers will want to know your ability to diagnose and solve complex problems. These questions cover more advanced scenarios and troubleshooting methodologies.

Q41: How do you troubleshoot a server that is not booting?

Troubleshooting involves:

  • Checking BIOS/UEFI settings and boot order.
  • Accessing GRUB menu to boot with a different kernel or into rescue mode.
  • Using an RHEL installation DVD/USB to access rescue mode and chroot into the system.
  • Checking boot logs (e.g., journalctl -xb after booting into rescue).
  • Verifying /etc/fstab integrity and disk issues.

Q42: What is a rescue mode and when would you use it?

Rescue mode (or emergency mode) is a minimal boot environment in RHEL that allows administrators to troubleshoot and repair a system that cannot boot normally. You would use it for fixing corrupted file systems, resetting root passwords, restoring bootloaders, or resolving configuration errors.

Q43: How do you perform a kernel update in RHEL?

Kernel updates are handled like any other package update using dnf update kernel or dnf update. After the update, a reboot is required for the new kernel to take effect. RHEL keeps old kernels, allowing you to boot into a previous version if issues arise.

Q44: Explain basic shell scripting.

Shell scripting involves writing a series of commands in a file (script) to automate tasks. Scripts typically start with a shebang (e.g., #!/bin/bash), can use variables, control structures (if/else, loops), and functions to perform complex operations.

Q45: How do you monitor system performance in RHEL?

Tools for performance monitoring include:

  • top / htop: CPU, memory, processes.
  • free -h: Memory usage.
  • iostat: Disk I/O statistics.
  • vmstat: Virtual memory statistics.
  • sar: System activity reporter (historical data).
  • uptime: System load averages.

Q46: What is a system call?

A system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. This includes actions like creating a process, reading/writing files, or accessing hardware.

Q47: How do you identify a process consuming high CPU or memory?

Use top or htop and sort processes by CPU or memory usage. For more detailed CPU analysis, pidstat from the sysstat package can be useful.

Q48: What is a default gateway?

A default gateway is a node (router) in a computer network that serves as the forwarding host to other networks when no other route specification matches the destination IP address of a packet. It's the "exit ramp" for traffic leaving the local network.

Q49: How do you check if a port is listening on a RHEL server?

Use the ss (socket statistics) command, which is a replacement for netstat.


sudo ss -tulnp | grep 80 # Check TCP/UDP, listening, numeric, processes for port 80
    

Q50: What is the purpose of the /proc filesystem?

The /proc filesystem is a virtual filesystem that provides an interface to kernel data structures. It contains runtime system information (e.g., system memory, CPU info, mounted devices) and details about running processes (each with its own directory /proc/<PID>). It's a pseudo-filesystem and not stored on disk.

Frequently Asked Questions (FAQ)

Below are some common questions about RHEL and interview preparation.

Q: Why is RHEL a popular choice for enterprises?

A: RHEL is popular due to its stability, extensive enterprise support, long-term maintenance cycles, strong security features, and broad compatibility with hardware and software vendors.

Q: How can I best prepare for an RHEL interview?

A: Practice hands-on with RHEL (even a virtual machine), understand core concepts, study common commands, and be ready to explain your experience with real-world scenarios. This guide is a great starting point.

Q: Is RHEL certification necessary for a job?

A: While not always strictly required, Red Hat certifications (like RHCSA or RHCE) are highly valued. They demonstrate a proven skillset and can significantly boost your chances in the job market.

Q: What is the difference between RHEL and Fedora?

A: Fedora is a community-driven, fast-release, cutting-edge distribution that serves as the upstream for RHEL. RHEL is derived from Fedora, focusing on stability, long-term support, and enterprise features.

Q: What are the typical responsibilities of an RHEL administrator?

A: Responsibilities include system installation and configuration, user and security management, package management, network setup, troubleshooting, performance monitoring, and ensuring system uptime and reliability.


{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Why is RHEL a popular choice for enterprises?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "RHEL is popular due to its stability, extensive enterprise support, long-term maintenance cycles, strong security features, and broad compatibility with hardware and software vendors."
      }
    },
    {
      "@type": "Question",
      "name": "How can I best prepare for an RHEL interview?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Practice hands-on with RHEL (even a virtual machine), understand core concepts, study common commands, and be ready to explain your experience with real-world scenarios. This guide is a great starting point."
      }
    },
    {
      "@type": "Question",
      "name": "Is RHEL certification necessary for a job?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "While not always strictly required, Red Hat certifications (like RHCSA or RHCE) are highly valued. They demonstrate a proven skillset and can significantly boost your chances in the job market."
      }
    },
    {
      "@type": "Question",
      "name": "What is the difference between RHEL and Fedora?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Fedora is a community-driven, fast-release, cutting-edge distribution that serves as the upstream for RHEL. RHEL is derived from Fedora, focusing on stability, long-term support, and enterprise features."
      }
    },
    {
      "@type": "Question",
      "name": "What are the typical responsibilities of an RHEL administrator?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Responsibilities include system installation and configuration, user and security management, package management, network setup, troubleshooting, performance monitoring, and ensuring system uptime and reliability."
      }
    }
  ]
}
    

Further Reading

To deepen your knowledge and stay updated on Red Hat Enterprise Linux, consider these authoritative resources:

Mastering these top 50 RHEL interview questions and answers will provide a solid foundation for your interview success. RHEL skills are highly sought after in the IT industry, and a deep understanding of these topics demonstrates competence and readiness. Keep practicing, stay curious, and you'll be well-prepared to tackle any RHEL challenge.

Ready to take your RHEL knowledge further? Subscribe to our newsletter for more expert guides and Linux tips, or explore our related RHEL posts.

1. What is RHEL?
RHEL (Red Hat Enterprise Linux) is a commercial Linux distribution developed by Red Hat for enterprise environments. It offers security, stability, lifecycle support, certified applications, and enterprise-grade features for production workloads.
2. What package manager does RHEL use?
RHEL uses RPM (Red Hat Package Manager) for packaging and dependency tracking, and DNF/YUM as front-end package managers. These commands are used to install, update, remove, and manage system packages and repositories efficiently.
3. What is SELinux in RHEL?
SELinux (Security-Enhanced Linux) enforces mandatory access control security policies. It restricts processes from accessing unauthorized files or systems. Modes include enforcing, permissive, and disabled based on use cases.
4. What is the purpose of the /etc/fstab file?
The /etc/fstab file defines disk partitions and mount points that automatically mount during system boot. It controls file system type, mount options, device paths, and behavior to ensure reliable storage configuration.
5. What is the difference between YUM and DNF?
DNF is the next-generation package manager replacing YUM in newer RHEL versions. It resolves dependencies faster, supports modular metadata, improves performance, and includes enhanced API support compared to YUM.
6. What is a repository in RHEL?
A repository is a source location from which RHEL downloads and installs packages. It contains metadata and signed packages, and can be hosted locally, via CDN, satellite server, or configured through subscription-manager.
7. What is subscription-manager?
subscription-manager is a tool used to register RHEL systems with Red Hat Customer Portal to access updates, repositories, support, and entitlement services. It enables license compliance and subscription tracking.
8. What command checks the current RHEL version?
You can check the current RHEL version using commands like cat /etc/redhat-release, hostnamectl, or lsb_release -a. These commands help identify OS build and major/minor release numbers.
9. What is the role of systemctl in RHEL?
systemctl is the command-line tool used to manage systemd services. It controls service states such as start, stop, restart, enable, and disable, and helps inspect system logs, targets, and runtime configurations.
10. What is firewalld in RHEL?
firewalld is the default firewall management tool in RHEL using dynamic zone-based configurations. It allows runtime rule changes, supports rich rules, and integrates with services, IP ranges, ports, and protocols.
11. What is the purpose of sudo in RHEL?
sudo allows permitted users to execute commands with elevated privileges without directly using the root account. Access is controlled through the /etc/sudoers file, improving security, auditing, and role-based permission control.
12. What is the function of the GRUB bootloader?
GRUB (Grand Unified Bootloader) is responsible for loading the kernel and initializing the boot process. It provides boot menu options, kernel selection, and recovery modes, making it essential for OS startup and troubleshooting.
13. What is a runlevel in RHEL?
Runlevels define different system operating states. In systemd-based RHEL, runlevels are replaced by "targets" such as multi-user.target, graphical.target, and rescue.target, controlling system behavior during startup or maintenance.
14. What is LVM?
LVM (Logical Volume Manager) allows flexible disk storage management using physical volumes, volume groups, and logical volumes. It enables resizing, snapshots, and efficient disk allocation without downtime or repartitioning.
15. How do you check running services in RHEL?
You can check running services using systemctl status, systemctl list-units --type=service, or ps aux. These commands help identify active, inactive, failed, or loaded system processes and services.
16. What is journald?
journald is systemd’s logging service responsible for collecting structured logs from system processes, kernel events, and services. Logs can be queried using journalctl and support persistent storage based on configuration.
17. What is kernel tuning in RHEL?
Kernel tuning adjusts system performance parameters using /etc/sysctl.conf or the sysctl command. It helps improve networking, memory handling, process limits, and performance optimization for production workloads.
18. What is the purpose of /var/log directory?
The /var/log directory stores system and application logs including security, boot, kernel, and audit logs. These logs assist in troubleshooting, forensic analysis, monitoring health, and maintaining system compliance.
19. What is the difference between soft and hard limits in RHEL?
Soft limits define resource boundaries users can exceed temporarily, while hard limits set maximum enforced limits. They are configured in /etc/security/limits.conf and help manage memory, processes, and open file usage.
20. What is SSH and how is it used in RHEL?
SSH (Secure Shell) provides encrypted remote access to servers using tools like ssh, scp, and sftp. It ensures secure authentication using passwords or key pairs for managing remote RHEL systems.
21. How do you create a new user in RHEL?
A new user can be created using the useradd command followed by passwd to set a password. User configurations are stored in /etc/passwd and /etc/shadow, enabling secure authentication and account management.
22. What is the purpose of /etc/hosts?
The /etc/hosts file maps hostnames to IP addresses for local name resolution. It is used before DNS queries and is useful for testing, static mappings, or offline environments requiring hostname identification.
23. What is crontab in RHEL?
crontab schedules recurring automated tasks such as backups, cleanup scripts, or monitoring jobs. It uses time-based syntax and runs via the cron daemon, enabling reliable automation without manual execution.
24. How do you check disk usage?
Commands like df -h show filesystem-level usage, while du -sh provides directory or file-level usage details. These tools help manage storage, detect capacity issues, and plan performance or scaling actions.
25. What is a swap space?
Swap space provides virtual memory by extending RAM capacity using disk storage. It prevents crashes when memory is full and supports features like hibernation, but excessive swapping may degrade performance under heavy load.
26. What is the /proc filesystem?
The /proc filesystem acts as a virtual file system exposing kernel and process information. It stores configuration values, runtime statistics, and device details, making it useful for debugging and monitoring system behavior.
27. What is chown used for?
The chown command changes ownership of files or directories for users and groups. It is essential for permission control, access management, and enforcing proper file security across multi-user environments.
28. What are Red Hat repositories?
Red Hat repositories provide certified software packages, security updates, and patches for RHEL systems. They can be accessed via subscription-manager, satellite server, or local mirrors for enterprise compliance and update management.
29. How is networking configured in RHEL?
Networking can be configured using NetworkManager, nmcli, nmtui, or configuration files under /etc/sysconfig/network-scripts/. These tools help manage interfaces, DNS, routing, bonding, and VLAN configurations.
30. What is a service unit file?
A service unit file defines how a systemd-managed service starts, stops, or runs. It includes configurations such as description, exec command, environment values, restart policies, and dependency settings stored under /etc/systemd/system/.
31. What is the purpose of /etc/passwd?
The /etc/passwd file stores basic user account information such as username, UID, GID, shell, and home directory. Although it historically stored passwords, modern systems use /etc/shadow for secure password hashing.
32. What is the /etc/shadow file?
/etc/shadow stores encrypted passwords and expiration details. Access is restricted to root for security. It prevents unauthorized password exposure and enforces secure authentication policies such as aging and lockout.
33. What is the purpose of kernel modules?
Kernel modules extend Linux kernel functionality without rebooting. Using commands like lsmod, modprobe, and rmmod, administrators can load, inspect, and remove drivers or components dynamically.
34. What is the difference between apt and yum/dnf?
APT is used in Debian-based systems while YUM/DNF is used in Red Hat-based platforms like RHEL. Both manage package installation, dependencies, updates, and repository communication but differ in architecture and tooling.
35. How do you set environment variables?
Environment variables can be set temporarily using export VAR=value or permanently by adding entries to /etc/environment, ~/.bash_profile, or ~/.bashrc files, enabling persistent runtime configuration.
36. What is the purpose of hwclock?
hwclock synchronizes the system time with the hardware clock. It ensures correct timekeeping across reboots, especially in servers where logs, authentication, automation, and distributed operations depend on synchronized timing.
37. What is a systemd target?
A systemd target replaces runlevels and defines system operational states such as rescue mode, multi-user, or graphical mode. It controls which services start during boot and provides a flexible boot and recovery architecture.
38. What is NTP and why is it used?
NTP (Network Time Protocol) synchronizes system clocks with accurate external time servers. It ensures timestamps used in logs, automation, authentication, and distributed computing remain consistent across systems.
39. What is a kernel panic?
A kernel panic occurs when the Linux kernel encounters a fatal error it cannot recover from. It halts the system to prevent data corruption and requires troubleshooting logs, drivers, and memory or hardware failures.
40. How do you restart network services in RHEL?
Network services can be restarted using systemctl restart NetworkManager or nmcli commands. These tools ensure updated configurations apply to interfaces, DNS, and routing without requiring a full system reboot.
41. What is SSH key authentication?
SSH key authentication uses a private-public key pair instead of passwords. The server stores the public key, while the private key remains with the user, allowing secure, automated, and passwordless authentication.
42. What is the purpose of sysctl?
sysctl modifies kernel runtime parameters such as networking, memory, and process limits. Permanent changes are stored in /etc/sysctl.conf and applied using sysctl -p for optimization and tuning.
43. How do you view active network connections?
Active network connections can be viewed using commands like netstat, ss, or lsof -i. They help diagnose traffic, troubleshoot networking issues, and monitor listening services and open ports.
44. What is RAID and how is it used in RHEL?
RAID (Redundant Array of Independent Disks) improves fault tolerance and performance. Using mdadm, RHEL supports RAID levels like 0, 1, 5, and 10 for redundancy and optimized storage management.
45. What is the purpose of user groups?
User groups simplify permission management across multiple users by assigning shared file and directory access. Groups enforce role-based access control and are managed with groupadd, usermod, and groupdel.
46. What command is used to update the system?
System updates are performed using sudo dnf update or yum update. These commands install security patches, bug fixes, and new package versions while maintaining system stability and compliance.
47. How do you enable a service at boot?
A service is enabled using systemctl enable service-name, allowing it to start automatically during boot. This ensures essential services remain available without manual intervention after restarts.
48. What is rsync used for?
rsync synchronizes files and directories efficiently over SSH or local copies, using differential transfers. It is commonly used for incremental backups, migrations, and replication tasks with minimal bandwidth usage.
49. What is the purpose of chmod?
The chmod command modifies file and directory permissions using symbolic or numeric modes. It controls read, write, and execute access for owners, groups, and others, enforcing secure access controls.
50. How do you check system hardware details?
Hardware details can be viewed using lscpu, lsblk, dmidecode, and lspci. These commands help analyze CPU, disks, memory, BIOS, and device information for troubleshooting and capacity planning.

Comments

Popular posts from this blog

What is the Difference Between K3s and K3d

DevOps Learning Roadmap Beginner to Advanced

Lightweight Kubernetes Options for local development on an Ubuntu machine