Files
A file is a named unit of data kept in storage, and a directory (also called a folder) is a container that groups files and other directories together, which is how an entire computer's storage — the same storage introduced in the previous topic as the place that keeps saved programs and files after shutdown — stays organized instead of becoming one enormous unsorted pile. Directories nest inside other directories, forming a tree that starts from a single root directory, written as `/` on Linux systems like Ubuntu: a user's personal files typically live under `/home/username`, often shown as a shortcut called the home directory and written as `~`, with further directories underneath it like Documents or Desktop holding the user's actual files. A path is simply the route through that tree to a specific file or directory, and it comes in two forms: an absolute path always starts from the root and spells out the complete route, like `/home/username/Documents/notes.txt`, so it works correctly no matter where a command happens to be run from, while a relative path starts from wherever the user currently is, like `Documents/notes.txt`, which is shorter to type but only resolves correctly from the right starting location. The terminal is a text-based way to give the operating system instructions directly, standing in contrast to clicking through a graphical file manager: it is itself an application, exactly the kind the previous topic described the operating system loading into memory and scheduling on the CPU, except the specific job this application does is read a typed line of text, called a command, and hand it to the shell, the program that actually interprets and runs it. A small set of core commands covers most day-to-day navigation and file management: `pwd` prints the current directory's absolute path, so the user always knows exactly where they are; `ls` lists the files and directories inside the current location; `cd` changes the current directory, accepting either an absolute or a relative path; `mkdir` creates a new directory; `cp` copies a file or directory to a new location; `mv` moves or renames a file or directory; and `rm` removes a file, permanently, which is why it deserves particular caution before being run. Running any one of these commands is not fundamentally different from running any other program: the shell parses the typed text, locates the actual program that command refers to, and the operating system loads and executes it exactly the way the previous topic described a browser being loaded, scheduled on the CPU, and run — `ls` is simply a small, fast program whose entire job is to read a directory's contents and print them back to the terminal, built from the same fetch-decode-execute cycle underneath every other program on the machine.