Skip to content
Clairos Learn

Terminal basics · Lesson 7 of 34 · 7 minutes

Environment variables

Inspect a simulated environment without exposing real browser or server secrets.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Many CLI tools read configuration from the environment.

env
Inspect shell environment variables. Assignments and export affect the training environment, never your host shell.

Environment output may expose real credentials outside the simulator.

echo
Write simple text to standard output. Prefer printf when exact formatting matters.

Redirection can overwrite an existing file before the command runs.

pwd
Print the directory that relative paths currently resolve from.

A relative path is interpreted from the working directory, not necessarily the home folder.

Worked example and expected result
$ env
HOME=/home/learner
USER=learner
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
PWD=/home/learner

Exit status: 0. The command completed successfully in the training fixture.

$ echo PATH is fake
PATH is fake

Exit status: 0. The command completed successfully in the training fixture.

$ pwd
/home/learner

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Environment variables”, which interpretation is safe?

Apply it elsewhere

Before adapting the echo workflow from “Environment variables” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: System identityTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Command locationsUse which to understand how shells find commands.Practice
  2. 02System identityInspect simulated kernel, hostname, and clock output.Practice
  3. 03Identity contextUse identity commands before interpreting permissions and logs.Practice