Linux

chevron-rightconceptshashtag

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.55

  • When to use: For diagnosing system performance or CPU bottlenecks.

  • Tip: On a 4-core system, a load of 4.0 is 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 nginx

    • systemctl enable app.service

  • journald: Collects logs.

    • View logs: journalctl -u myapp.service

    • Persistent logs: ensure /var/log/journal exists.


🔹 4. SELinux & AppArmor

  • SELinux: Security Enhanced Linux — enforces security policies.

  • Modes:

    • Enforcing

    • Permissive

    • Disabled

  • Check: getenforce

  • When 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/O

    • iotop: Live I/O usage

    • vmstat: Virtual memory

  • When to use: To troubleshoot slow disk or high IO wait issues.


🔹 7. Process Monitoring

  • top, htop, ps aux, pidstat

  • Example: ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head


🔹 8. Networking Tools

  • ss (replacement of netstat)

  • tcpdump: packet analysis

  • nmap: port scanning

  • traceroute, mtr: path tracing


🔹 9. Cron & at

  • cron: Scheduled recurring jobs

  • at: One-time task scheduling

  • Log: /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 -a

  • Purpose: 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=1

  • Persistent: /etc/sysctl.conf


🔹 14. Filesystem Management

  • Tools: lsblk, df, du, mount, umount

  • Filesystems: ext4, xfs, btrfs, zfs

  • Resize: resize2fs, xfs_growfs


🔹 15. Disk Partitioning and LVM

  • Tools: fdisk, parted, lsblk

  • LVM: Create volume groups, logical volumes

    • Commands: pvcreate, vgcreate, lvcreate


🔹 16. Log Analysis

  • Parse logs using awk, grep, sed, cut, jq

  • Monitor logs: tail -F /var/log/syslog


🔹 17. Kernel Crash Debugging (kdump)

  • Enables system to capture dump after kernel crash.

  • Config: /etc/kdump.conf

  • Use 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