Enterprise Operations
Linux & Red Hat
Linux is the foundation of modern servers, cloud platforms, containers, security tooling, and DevOps automation. Red Hat Enterprise Linux adds enterprise lifecycle, support, hardened defaults, predictable package management, and production-ready platform standards.
KernelHardware control
systemdService manager
DNF/RPMPackages
SELinuxAccess control
🐧 → 🧱 → 🔐
Kernel → Services → Security → Automation
🐧
Linux Architecture
Kernel & User Space
Linux is built around the kernel. The kernel manages CPU, memory, disks, network devices, processes, system calls, and security boundaries.
Core layers- Hardware: CPU, RAM, disks, NICs
- Kernel: scheduler, memory, drivers
- System libraries: glibc and runtime libraries
- System services: systemd, journald, sshd
- User tools: bash, dnf, vim, curl
KernelUser SpaceShellDrivers
🎩
Red Hat Enterprise Linux
Enterprise Platform
RHEL is designed for enterprise workloads. It focuses on stability, security updates, certified ecosystems, lifecycle management, and automation.
Important RHEL areas- RPM package format
- DNF package manager
- SELinux policy enforcement
- firewalld zones and services
- System roles and automation
RHEL 9RHEL 10RPMDNF
⚙️
Production Operations
Run & Secure Systems
A production Linux engineer must understand services, logs, permissions, ports, firewall rules, storage, backup, monitoring, and change control.
Daily responsibilities- Check system health
- Review logs and failed services
- Patch packages safely
- Manage users and access
- Monitor disk, CPU, memory, and network
MonitoringPatchingLogsSecurity
Linux Architecture Map
| Layer | Purpose | Examples |
|---|---|---|
| Hardware | Physical or virtual resources | CPU, RAM, disks, NICs |
| Kernel | Controls hardware and system calls | Scheduler, memory manager |
| Init system | Starts and manages services | systemd, systemctl, journald |
| Security | Controls access and isolation | Users, groups, sudo, SELinux |
| Applications | Business or platform workloads | Apache, Nginx, Java, Kafka, Elasticsearch |
Production Server Flow
🌐Network
→
🔥firewalld
→
⚙️Service
🔐SELinux
→
📁Storage
→
📊Logs
A request enters through the network, passes firewall policy, reaches a service, is controlled by SELinux and permissions, writes to storage, and produces logs for troubleshooting.
Linux File System Cheat Sheet
| /etc | System configuration files |
| /var/log | Log files such as messages, secure, audit, and application logs |
| /var/lib | Persistent state data for services |
| /usr/bin | User command binaries |
| /usr/sbin | System administration binaries |
| /home | User home directories |
| /root | Root user home directory |
| /tmp | Temporary files |
| /boot | Kernel and boot loader files |
Essential Linux Commands
# system information
hostnamectl
uname -r
cat /etc/redhat-release
# disk and memory
df -h
du -sh /var/log/*
free -h
lsblk
# processes
ps aux | grep java
top
uptime
# logs
journalctl -xe
journalctl -u sshd -n 100
tail -f /var/log/messagessystemd & Service Management
# service status
systemctl status sshd
systemctl status firewalld
# start, stop, restart
systemctl start nginx
systemctl restart nginx
systemctl stop nginx
# boot behavior
systemctl enable nginx
systemctl disable nginx
# failed services
systemctl --failed
journalctl -u nginx -n 200 --no-pagerDNF & RPM Package Management
# package operations
dnf search nginx
dnf install nginx
dnf update
dnf remove nginx
# package information
rpm -qa | grep nginx
rpm -qi nginx
rpm -ql nginx
# repo checks
dnf repolist
dnf clean all
dnf makecacheUsers, Groups, Permissions & sudo
# users and groups
id soheil
getent passwd soheil
getent group wheel
# ownership and permissions
ls -l /etc/ssh/sshd_config
chown root:root file
chmod 644 file
chmod 750 script.sh
# sudo
sudo -l
visudoPermission example: 644 means owner can read/write, group can read, and others can read. It does not give execute permission.
SELinux & firewalld
# SELinux
getenforce
sestatus
ausearch -m AVC -ts recent
sealert -a /var/log/audit/audit.log
# firewalld
firewall-cmd --state
firewall-cmd --get-active-zones
firewall-cmd --list-all
firewall-cmd --add-service=https --permanent
firewall-cmd --reloadNetworking Cheat Sheet
# IP and routes
ip addr
ip route
nmcli connection show
# DNS
resolvectl status
nslookup example.com
dig example.com
# ports
ss -tulpn
ss -tnp | grep 9093
nc -vz server.example.com 443
curl -vk https://server.example.comStorage, LVM & Filesystems
# block devices
lsblk
blkid
df -hT
# LVM overview
pvs
vgs
lvs
# mount points
findmnt
cat /etc/fstab
# disk usage
du -sh /var/* | sort -hLogging & Troubleshooting Flow
| Step | Command | Purpose |
|---|---|---|
| Health | uptime, free -h, df -h | Find CPU, memory, disk pressure |
| Service | systemctl status app | Check running or failed state |
| Logs | journalctl -u app | Find service errors |
| Network | ss -tulpn, nc -vz | Check ports and reachability |
| Security | getenforce, firewall-cmd | Check SELinux and firewall blocks |
Production Linux Best Practices
| Area | Good practice | Why it matters |
|---|---|---|
| Access | Use named users and sudo rules | Improves auditability |
| Patching | Patch in test before production | Reduces outage risk |
| Storage | Separate logs and application data | Protects root filesystem |
| Services | Enable only needed services | Reduces attack surface |
| Firewall | Open only required ports | Limits unwanted access |
| SELinux | Keep enforcing where possible | Adds strong security boundary |
| Monitoring | Alert on disk, memory, CPU, services | Finds issues early |
| Documentation | Document runbooks | Speeds incident handling |
Key Takeaways
Linux architectureUnderstand kernel, user space, services, storage, network, and security layers.
RHEL focusRed Hat adds lifecycle, support, security, and stable package management.
systemdUse systemctl and journalctl together when checking services.
SecurityPermissions, sudo, SELinux, and firewalld must be checked together.
Production mindsetUse monitoring, automation, change control, and repeatable configuration.
LinuxRHELsystemdDNFRPMSELinuxfirewalldLVMAnsibleDevOps