Linux & OS Internals
Kernel space, user space and system calls
A program cannot write to a disk or open a network connection by itself. See the one door every program uses to ask the kernel, and how to watch it open.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Linux & OS Internals
- Processes: PID, ps and topBeginner · 5 min
Every incident starts with two questions: what is running, and who started it. Learn to answer both in under a minute, and what the columns mean.
- fork, exec and process statesBeginner · 5 min
Every command you type starts with a copy of your shell, then a swap of the program inside it. That explains parents, children, exit codes and why cd is built in.
- File descriptors, stdin, stdout and stderrBeginner · 5 min
Every open file, socket and terminal is a small number inside a process. Three of them exist before the program starts, and one limit on them causes Too many open files.
- Pipes and redirection: pipe, >, >> and 2>&1Beginner · 5 min
The shell can rewire a program's input and output without the program knowing. Learn the symbols, the order trap in 2>&1, and the one that erases your file.
- Searching text with grepBeginner · 5 min
Finding the 42 lines that matter in a 180,000-line log is one command. Learn the options you will type every day, and the dot that matches more than you meant.
- One-liners with sort, uniq, cut, wc, awk and sedBeginner · 5 min
Turn a 10,000-line log into the three numbers you need. Six small tools, one pipeline pattern, and the reason uniq without sort gives wrong counts.