Section 0.1: The Machine and Where Things Live
Every word you will use for the rest of this bootcamp, process, memory, file, path, is used here as though it already means something precise. Most people arrive with a vague version of each: a program is "open", data is "saved", a file "is" a spreadsheet, a file's location is wherever the window showed it. Those approximations hold until the first time a run dies and takes six hours of work with it, or a script that worked yesterday reports that a file plainly sitting on disk does not exist. Then they stop holding all at once. This section replaces each approximation with the mechanical version.
Nothing precedes this section. What it picks up is the gap left by ordinary computer use, which teaches you to operate a machine without ever telling you what it is doing. It closes that gap in two halves. The first is what happens when instructions are loaded and run, and what memory keeps versus what it discards the instant a process ends. The second is where the results of that work land, how directories nest into one tree, and how a single line of text names one exact spot in it.
Lessons
- How Code Runs - From Instructions to Running Processes - what turns a file of instructions into a live process the operating system is tracking, and how to read its identifier and stop it.
- Memory vs Storage - Where Your Data Lives and What a Crash Destroys - the difference between what vanishes with the process and what survives it.
- Files, Directories, and the Filesystem Tree - how directories nest into one tree rooted at
/, and where your own files sit in it. - Paths and Path Resolution - writing the address of any file, and the one rule that turns that address plus your current location into a single spot on disk.
By the end you will be able to:
- Describe what the operating system creates and tracks when a program starts.
- Predict which of a running program's data survives a crash and which is gone.
- Write the absolute path to any file on the machine, and convert between absolute and relative.
- Predict what a relative path resolves to before running the command.
- Explain why a script that works in one directory fails in another, and fix it.