Adds all 6 ROOT 01 modules (how computers run software, the shell, filesystem navigation, files & text, processes, users & permissions foundations), each with a real lesson, demonstration/guided exercise, knowledge check where warranted, a hands-on Lab, and a reflection — 35 activities, 29 new content files. Adds 6 new hands-on Linux scenarios (linux-inspect-hardware, linux-shell-basics, linux-filesystem-navigation, linux-files-and-text, linux-process-management, linux-permissions-foundations) plus 2 MCQ scenarios, using the existing generic scenario/ validation engine (docs/ROOT_FOUNDATIONS_LAB_STRATEGY.md §1) — every one tested end-to-end via the real scenario setup/validate API, including negative tests confirming they correctly FAIL when not actually solved (e.g. the process-management scenario fails while the target process is still running; the permissions scenario is tested against a real `su - labuser` denial). Wires rootnode-linux-foundations-assessment (2 required + 4 random-draw scenarios) using the existing Phase 3B assessment engine. Adds a real, server-side ROOT 01->02->03->04->05 course prerequisite chain (courses.prerequisites) — verified live on two students: one who completed ROOT 01 sees ROOT 02 unlock; a fresh student sees ROOT 02 correctly locked while 03/04/05 stay vacuously satisfied (their own prerequisite courses are still empty). ROOT 06+ and the Capstone are unaffected. Co-Authored-By: Claude Sonnet 5 <[email protected]>
59 lines
2.7 KiB
Markdown
59 lines
2.7 KiB
Markdown
# Linux and the Shell
|
|
|
|
## What "Linux" actually means
|
|
|
|
Linux is a **kernel** — the core piece of software from Module 1 that manages CPU, memory, and
|
|
storage. What most people call "a Linux system" (Ubuntu, Debian, Fedora, Alpine...) is a
|
|
**distribution**: the Linux kernel plus a chosen set of standard tools, package manager, and
|
|
configuration conventions layered on top. Different distributions, same kernel underneath —
|
|
which is why a command you learn on Ubuntu mostly still works on Alpine.
|
|
|
|
## Shell vs. terminal
|
|
|
|
These get used interchangeably but are different things:
|
|
|
|
- The **terminal** is the window/program that displays text and sends your keystrokes somewhere.
|
|
- The **shell** is the program actually interpreting what you type as commands — `bash` is the
|
|
shell this Lab uses. The terminal is just the display; the shell is the brain.
|
|
|
|
## Command structure
|
|
|
|
Every command follows roughly the same shape:
|
|
|
|
```
|
|
command [options] [arguments]
|
|
```
|
|
|
|
`ls -la /var/log` — `ls` is the command, `-la` are options (flags) that change its behavior,
|
|
`/var/log` is the argument (what to act on). Options can usually be combined (`-l -a` = `-la`).
|
|
|
|
## Exit codes: how a command reports success or failure
|
|
|
|
Every command returns a number when it finishes: `0` means success, anything else (1-255) means
|
|
some kind of failure. This isn't a Linux quirk — it's the exact mechanism scripts, CI pipelines,
|
|
and (much later) Kubernetes health checks all rely on to know whether something worked. You can
|
|
read the last command's exit code with the special variable `$?`.
|
|
|
|
## Getting help without leaving the terminal
|
|
|
|
- **Tab completion** — press Tab while typing a command or path; the shell completes it for you
|
|
or shows you the options. This is a genuine time-saver, not just a convenience.
|
|
- **Command history** — press the Up arrow to recall previous commands; `history` lists them.
|
|
- **`man <command>`** — the manual page for almost any command, with every option explained.
|
|
`man ls`, `man grep`, `man chmod` are all real, useful references — reaching for `man` before
|
|
a search engine is a habit worth building now.
|
|
|
|
## Instructor Notes
|
|
|
|
**Lesson goal:** Establish shell fluency vocabulary (shell vs. terminal, exit codes, options vs.
|
|
arguments) that every later module assumes without re-explaining.
|
|
|
|
**Approximate timing:** 15 minutes read; 10 minutes live with a short live demo of tab
|
|
completion and `man`.
|
|
|
|
**Common misconception to watch for:** students often think "Linux" and "the terminal" are the
|
|
same thing — clarify the kernel/distribution/shell/terminal layering explicitly.
|
|
|
|
**Demo idea:** live-type a command that fails (e.g. `ls /nonexistent`), then run `echo $?`
|
|
immediately after to show the exit code in real time — more convincing than describing it.
|