Linux
concepts
Here’s a list of advanced Linux topics commonly encountered in senior DevOps roles (including Amazon) along with key concepts and when to use them, tailored for interview preparation:
🔹 1. Load Average
What it is: Represents the average number of processes waiting to run on CPU over 1, 5, and 15 minutes.
Example:
load average: 1.25, 0.80, 0.55When to use: For diagnosing system performance or CPU bottlenecks.
Tip: On a 4-core system, a load of
4.0is ideal — anything consistently above it means CPU congestion.
🔹 2. Logrotate
What it is: A tool to automatically rotate, compress, and remove old log files.
When to use: To prevent logs from consuming disk space.
Key Config:
/var/log/myapp/*.log { daily rotate 7 compress missingok notifempty create 0640 root root }Command to test:
logrotate -d /etc/logrotate.conf
🔹 3. Systemd & Journald
systemd: Init system used to bootstrap and manage services.
systemctl start nginxsystemctl enable app.service
journald: Collects logs.
View logs:
journalctl -u myapp.servicePersistent logs: ensure
/var/log/journalexists.
🔹 4. SELinux & AppArmor
SELinux: Security Enhanced Linux — enforces security policies.
Modes:
Enforcing
Permissive
Disabled
Check:
getenforceWhen to use: For fine-grained access control on RHEL-based systems.
🔹 5. cgroups & namespaces (Container fundamentals)
cgroups: Limit resources (CPU, memory) for processes.
namespaces: Provide isolation (PID, NET, MNT, etc.).
Use Case: Underpin Docker containers and Kubernetes pods.
🔹 6. I/O Bottleneck Analysis
Commands:
iostat: Disk I/Oiotop: Live I/O usagevmstat: Virtual memory
When to use: To troubleshoot slow disk or high IO wait issues.
🔹 7. Process Monitoring
top,htop,ps aux,pidstatExample:
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
🔹 8. Networking Tools
ss(replacement ofnetstat)tcpdump: packet analysisnmap: port scanningtraceroute,mtr: path tracing
🔹 9. Cron & at
cron: Scheduled recurring jobsat: One-time task schedulingLog:
/var/log/cron
🔹 10. Inotify & fswatch
inotify: Monitor file system events.
Example: Automate restart when config changes.
Tool:
inotifywait,entr
🔹 11. System Boot Process
BIOS → Bootloader (GRUB) → Kernel → init/systemd → Targets
Troubleshoot:
dmesg,journalctl -xb, rescue mode
🔹 12. Ulimits
Command:
ulimit -aPurpose: Set resource limits on users/processes (open files, memory, etc.)
🔹 13. Kernel Tuning (sysctl)
Edit runtime kernel parameters.
Example:
sysctl -w net.ipv4.ip_forward=1Persistent:
/etc/sysctl.conf
🔹 14. Filesystem Management
Tools:
lsblk,df,du,mount,umountFilesystems: ext4, xfs, btrfs, zfs
Resize:
resize2fs,xfs_growfs
🔹 15. Disk Partitioning and LVM
Tools:
fdisk,parted,lsblkLVM: Create volume groups, logical volumes
Commands:
pvcreate,vgcreate,lvcreate
🔹 16. Log Analysis
Parse logs using
awk,grep,sed,cut,jqMonitor logs:
tail -F /var/log/syslog
🔹 17. Kernel Crash Debugging (kdump)
Enables system to capture dump after kernel crash.
Config:
/etc/kdump.confUse case: Forensics and root cause analysis.
Would you like me to turn this into a downloadable PDF or prepare flashcards for each topic?
Last updated