A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
An environment variable is process state passed to child processes when exported. Bash also has shell variables that are not automatically part of the child environment. The distinction matters for security scripts: setting `API_KEY=...` does not make it visible to an invoked child until it is exported, while `PATH` strongly influences which executable Bash resolves when a command name lacks a slash.
Interactive Bash startup behavior depends on how the shell was invoked and which startup files exist. Common files include `~/.bashrc` and `~/.bash_profile`, while system-wide configuration may live under `/etc`. For security work, inspect the actual shell mode and avoid assuming one universal startup order. A compromised profile or writable directory early in PATH can redirect commands to attacker-controlled programs.
Shows command-search directories in order. The useful habit here is to treat the command output as evidence about one system fact, not as a magical diagnosis.
Using `export PATH="/tmp:$PATH"` in a test shell is a useful demonstration but a terrible operational default. Command resolution is security-sensitive. Keep writable directories out of privileged execution paths and use absolute executable paths in high-impact scripts when practical.
Demonstrates that an exported parent variable becomes visible in a child Bash process. Read the result in context: the same command can be correct yet insufficient if a permission boundary, alternate configuration, or different backend changes what it reports.
Resolves the executable Bash would invoke for `ssh` in the current PATH. In a production workflow, save the raw result when the observation contributes to a finding. That keeps later analysis honest and makes troubleshooting reproducible.
A practitioner’s checkpoint: compare the observed behavior with the assumption your script is about to make. If the assumption is broader than the evidence, narrow the rule. If the evidence is incomplete, report the uncertainty instead of converting it into a confident finding.
Lab discipline: stay inside the declared course environment, prefer read-only checks for learning exercises, and preserve the original output of security tools before transforming it.
Finish the lesson once you have worked through the material. This awards ★ 35 XP.