Variables
Variables: Variables in the Shell, Environment Variables: export and env, PATH: How a Command Is Found.
Updated
- Variables in the Shell (Apprentice): A shell variable is a name the shell keeps a value under, so owl_folder=… stores a long path once and $owl_folder hands it back in any command until you close the window.
- Environment Variables: export and env (Apprentice): Programs you start can't see your shell variables, only environment variables, so export shares a variable with them, env and printenv show what they'll see, and NAME=value in front of a command sets one for that command alone.
- PATH: How a Command Is Found (Apprentice): When you type a command's name, the shell looks for a program file of that name in each folder of PATH, in order, so "command not found" means none of them has it, and adding a folder to PATH lets you run its programs by name from anywhere.