Glossary

Working directory

The folder your shell is currently "standing" in.

Every process carries a current working directory, and all relative paths are resolved against it. Your shell's is what pwd prints and what cd changes.

Since each process has its own, and children inherit the parent's at launch, a script cannot change your shell's directory — and a cron job starts in the user's home rather than wherever the script file lives, which is the single most common reason scripts "work by hand but fail from cron".

See it in practice

$ pwd && (cd /tmp && pwd) && pwd

The subshell in parentheses changes its own directory and exits; your shell never moved. Inheritance flows one way only.

Where you'll meet it

pwd

Show the absolute path of the directory you are currently in.

cd

Move between directories: absolute and relative paths, home shortcut, and jumping back.

Absolute vs relative path

Full address from / versus directions from where you stand.

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.