Opscraft
Foundations: Linux, scripting, Git & networking

Linux

Must-know10 lessons · 61 min · 3 tests ·

Linux is the ground floor of everything you run: EC2 instances, EKS worker nodes, containers (which are just Linux processes with isolation), CI agents and bastion hosts. At senior level, interviewers aren't checking whether you know ls. They want to see that you understand what the kernel is doing — processes, memory, file descriptors, the page cache, cgroups — and that you can take a vague complaint like "the server is slow" and narrow it down methodically. This topic goes from how Linux boots to a full troubleshooting runbook.

Stage 1 · Foundations

Know these first

After this topic you can

  • Explain how Linux boots, runs processes and stores files
  • Manage users, permissions, services and disks on a server
  • Troubleshoot a slow or full server methodically

Lessons

  1. 1How Linux is put together 8 min read
    • Kernel space and user space
    • The boot sequence
    • Everything is a file
    • The filesystem hierarchy
    • Inodes and links
  2. 2Users, groups and permissions 6 min read
    • Identities
    • sudo
    • Permission bits
    • Special bits
    • umask
    • Beyond rwx: ACLs, capabilities, SELinux
  3. 3Processes, signals and systemd 9 min read
    • How processes are born
    • Process states
    • Signals
    • Priorities
    • systemd
    • Scheduling: cron and timers
  4. 4Shell scripting and text processing 6 min read
    • Streams, redirection and pipes
    • Exit codes and safe scripts
    • Variables and quoting
    • Loops, conditions and functions
    • The text toolkit
  5. 5Storage, filesystems and disks 5 min read
    • Block devices to mounted filesystems
    • Growing an EBS volume with no downtime
    • Space vs inodes vs open files
    • logrotate
    • Swap
  6. 6CPU, memory and the kernel's view 7 min read
    • Load average
    • CPU time breakdown
    • Memory: what "free" really means
    • The OOM killer
    • cgroups and namespaces — how containers really work
    • Kernel tuning with sysctl
    • File descriptor limits
  7. 7Networking from the host's point of view 5 min read
    • Interfaces, addresses and routes
    • Sockets and ports
    • Name resolution on the host
    • Testing connectivity layer by layer
    • Host firewall
    • SSH essentials
  8. 8Troubleshooting runbook: "the server is slow" 5 min read
    • Think in a method, not commands
    • The first 60 seconds
    • Going deeper on one process
    • Scenario walkthroughs
    • Making the fix stick
  9. 9Security hardening and fleet operations 4 min read
    • Hardening a Linux server
    • Package management
    • Managing many servers without Ansible
    • Time, logs and certificates
  10. 10Interview questions and model answers 6 min read
    • "Walk me through what happens when you run a command in the shell."
    • "A disk is 100% full on a production server. What do you do?"
    • "What's the difference between a process and a thread? Why does it matter for containers?"
    • "Explain load average. Is a load of 8 bad?"
    • "What is a zombie process and how do you get rid of it?"
    • "How does the OOM killer decide what to kill, and how would you investigate an OOM?"
    • "SSH to a server hangs. How do you debug?"
    • "How do you find which process is listening on port 8080, and why can't another host reach it?"
    • "What does set -euo pipefail do?"
    • "How do containers isolate processes on Linux?"