Linux, terminal and Git

Stage 2 · Lesson 6 of 9

Environment variables

Shell basics

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

Practise

  • A game played over SSH where each level needs a new command, from `ls` to finding hidden files

Keep handy

  • Paste any command and see what each part does before you run it

  • Short, example-first help pages for common commands when a man page is too long

Also worth your time

Mark this stage as not done?