Stage 2 · Lesson 6 of 9
Environment variables
are named settings that every program you start picks up from the shell. Common ones are HOME (your ), USER, SHELL and EDITOR. echo $HOME prints one, and env lists them all.
export NAME=value sets one for the current shell and for anything you start from it. Tools read settings and secrets this way, such as an or NODE_ENV. A variable set in one terminal tab does not exist in another tab. It also disappears when you close the tab, unless you add it to a .
Common trapputting real secrets into files you later commit to .
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's lectures on the shell and shell tools, with exercises after each one
- BookFreeThe Linux Command Line
William Shotts · Beginner
A free book that explains the shell step by step; the first part covers this whole stage
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The full map of shell and Bash topics, to see what comes after the basics