foundation Estimated learning time: 10 h

P-1.4 Files, Processes and What the Operating System Does

You can explain what a process is, how a program receives input and returns a result to whatever started it, and how paths and permissions decide what a program can reach.

Programs do not run on hardware, they run on an operating system, and it decides almost everything about what they can see and do. This topic covers the small set of ideas that turn up in every language and every deployment afterwards: processes, the file system, standard input and output, exit codes and environment values. The common confusion is treating a file path as a name rather than as a lookup that depends on where the program was started from.

Work through these

  • A process: one running program, with its own memory and its own view of the machine

    Starting a program creates a process, which the operating system gives its own memory and its own handles on files. Two runs of the same program share nothing by default, which is what makes them safe to run side by side.

  • The file system, absolute paths and relative paths

    A relative path is resolved against the directory the process happens to be in, so the same string names different files depending on where it was run. A surprising share of first deployment failures are exactly this.

  • Standard input, standard output and standard error

    Every process starts with three streams already open, which is why programs can be chained together without knowing about each other. Sending diagnostics to the error stream keeps them out of the data another program is reading.

    The Linux command line for beginners · Tutorial
  • Exit codes: how a program says whether it worked

    A process ends with a small number, zero meaning success, and every script and build system in existence is reading it. A program that fails while reporting zero will be believed.

  • Environment values and why configuration lives in them

    The operating system hands each process a set of named values it can read, which is how settings reach a program without being written into it. It is also how secrets reach a program without being committed alongside the code.

Sign in to keep your progress.

Free resources

Links last checked 31 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.