Linux Fundamentals

Environment Variables and Shell Startup

Diagnose Linux environment and shell-startup problems by comparing the actual user, process, PATH, shell mode, and launch mechanism.

Beginner18 min read
Linux Fundamentals lessonLinuxPractice

UNTIMED COACHING

Practice before the pressure

Use feedback to correct the model, not merely memorize an option position.

GUIDED PRACTICE

Practice the lesson questions

Answer normal lesson questions without a timer. Every answer includes an explanation, and incorrect answers can be tried again before continuing.

COMMAND EVIDENCE

Inspect the process environment before editing startup files

Read the command together with the observable result. The full Learn section explains what this evidence proves and what it does not prove.

$ printf 'user=%s\ncwd=%s\n' "$(id -un)" "$PWD"
user=ana
cwd=/srv/reporting
$ command -v report-sync
/home/ana/.local/bin/report-sync
Read the full command context in Learn

CONCEPT MODELS

See the lesson as a system

Use these visual guides to connect the key ideas before answering the questions.

Shell and child-process inheritanceExport determines whether a future child process receives a shell value.
Shell and child-process inheritanceA shell variable becomes exported and is inherited by a newly launched child process.
Know what export changesVariable exists in the current Bash process
Exported nameMarked for inheritance
New child processReceives the exported value
Existing processKeeps its original environment