Linux — Level by Level›Level 3 · Cheat sheet & self-check

Level 3 — Advanced: kernel & security · wrap-up

Cheat sheet & self-check

22 questions across 7 lessons. Each answer links back to the lesson it came from.

Pick an answer to see if you got it, and why.

  1. Q1. What is a system call?

    Show answer

    B. User programs can't touch hardware directly; they ask the kernel through system calls like open, read, write, connect and clone.

    From lesson 13 · Kernel, modules & sysctl
  2. Q2. You set 'sysctl -w net.ipv4.ip_forward=1' and it's gone after a reboot. How do you make it permanent?

    Show answer

    B. sysctl -w changes the running kernel only. Files in /etc/sysctl.d/ are applied at every boot.

    From lesson 13 · Kernel, modules & sysctl
  3. Q3. Why does a Kubernetes node need the br_netfilter module and net.bridge.bridge-nf-call-iptables=1?

    Show answer

    B. Pod traffic often crosses a bridge. Without br_netfilter, it would bypass the iptables rules that kube-proxy and some CNIs rely on.

    From lesson 13 · Kernel, modules & sysctl
  4. Q4. What do namespaces control?

    Show answer

    B. Namespaces isolate views of the system. Limits on how much a process can use come from cgroups.

    From lesson 14 · cgroups & namespaces
  5. Q5. Inside a new PID namespace, what PID does your shell get?

    Show answer

    B. The first process in a PID namespace is PID 1 there, even though it has a normal PID on the host. That's why container entrypoints run as PID 1.

    From lesson 14 · cgroups & namespaces
  6. Q6. A pod is OOMKilled. Which kernel mechanism enforced its memory limit?

    Show answer

    B. The kubelet and runtime put each container in a cgroup with memory.max set from its limit. Exceeding it triggers the OOM killer for that cgroup.

    From lesson 14 · cgroups & namespaces
  7. Q7. How can you run 'ip addr' as a pod's network sees it, from the node?

    Show answer

    B. nsenter joins an existing process's namespaces. It's the host-side way to debug a container's networking with the host's tools.

    From lesson 14 · cgroups & namespaces
  8. Q8. On a two-socket server, why can memory access be slower for some processes?

    Show answer

    B. Each socket has its own memory controller. Crossing the interconnect adds latency, so placing a process's CPUs and memory on the same node helps.

    From lesson 15 · NUMA, huge pages & CPU pinning
  9. Q9. What do huge pages reduce?

    Show answer

    B. With 2 MiB or 1 GiB pages, far fewer translations are needed, which helps memory-intensive workloads like DPDK and some databases.

    From lesson 15 · NUMA, huge pages & CPU pinning
  10. Q10. With the Kubernetes CPU Manager 'static' policy, which pods get exclusive CPUs?

    Show answer

    B. Only Guaranteed pods with integer CPU requests are pinned to dedicated cores. Everything else shares the remaining pool.

    From lesson 15 · NUMA, huge pages & CPU pinning
  11. Q11. What does a flame graph show?

    Show answer

    B. Wide boxes are where time goes. You read upwards from the bottom: callers below, callees above.

    From lesson 16 · Tracing with perf & eBPF
  12. Q12. Why is eBPF attractive for production troubleshooting?

    Show answer

    B. The kernel verifier checks eBPF programs before they run, so they can't crash the kernel. That makes live tracing on production hosts practical.

    From lesson 16 · Tracing with perf & eBPF
  13. Q13. A service is slow, and iostat shows the disk isn't very busy. Which tool shows whether the few I/Os it does are slow?

    Show answer

    B. Averages hide outliers. biolatency shows the distribution: a long tail of slow I/Os can hurt even when utilisation is low.

    From lesson 16 · Tracing with perf & eBPF
  14. Q14. nginx on RHEL returns 403 for files in /srv/www, although permissions are 644. ls -Z shows 'default_t'. Best fix?

    Show answer

    B. SELinux blocks nginx (httpd_t) from reading default_t files. Recording the correct label in policy and applying it fixes it permanently and keeps protection on.

    From lesson 17 · SELinux & AppArmor
  15. Q15. What does Permissive mode do?

    Show answer

    B. Permissive shows every denial the policy would make, without blocking. Use it briefly to collect denials, then fix and return to Enforcing.

    From lesson 17 · SELinux & AppArmor
  16. Q16. How is AppArmor different from SELinux in how it identifies what to protect?

    Show answer

    B. AppArmor rules say 'this program may access these paths'. SELinux rules say 'this process type may do this to that object type', based on labels.

    From lesson 17 · SELinux & AppArmor
  17. Q17. What's the first step in hardening a server?

    Show answer

    B. Everything that listens or runs is something that could be attacked. The safest service is the one that isn't installed.

    From lesson 18 · Host hardening
  18. Q18. You're about to set 'PasswordAuthentication no' in sshd_config remotely. What protects you from locking yourself out?

    Show answer

    B. An existing session survives a reload. If the new login fails, you can still fix the config from the old one.

    From lesson 18 · Host hardening
  19. Q19. What does an auditd watch like '-w /etc/sudoers -p wa -k sudoers' record?

    Show answer

    B. -w watches a path, -p wa selects write and attribute changes, -k tags events so 'ausearch -k sudoers' finds them.

    From lesson 18 · Host hardening
  20. Q20. Why measure against a CIS benchmark?

    Show answer

    B. Benchmarks turn 'is it hardened?' into a measurable score, and scanning tools (OpenSCAP, Ubuntu Security Guide) make it repeatable.

    From lesson 18 · Host hardening
  21. Q21. Why capture a baseline before changing anything?

    Show answer

    B. Every change should be justified by evidence. The baseline is the reference that turns opinions into measurements.

    From lesson 19 · Capstone: harden & tune a host
  22. Q22. Your tuning change makes the p50 latency better but the p99 worse. What do you do?

    Show answer

    B. Averages and medians hide the slowest requests. Decide against user-facing goals, usually expressed as a high percentile.

    From lesson 19 · Capstone: harden & tune a host