The four characters that save your life
Almost every shell has the same four shortcuts:
~— your home directory ($HOME). The shell expands it before running the command..— the current directory. Often used as./script.shto disambiguate from a command on PATH...— the parent directory. Stack them:cd ../../grandparent.-— only valid withcd; jumps to the previous directory.
Tilde with usernames
~ alone = your home. ~alice = Alice's home (if you have read access). Useful on shared servers. It is uncommon on a single-user Mac, but it shows up in older Linux scripts often.
Tilde and brace expansion
Tilde is a shell expansion, not a directory entry, so it works in places you don't expect. cp ~/.zshrc ~/.zshrc.bak works, but inside single quotes '~/file' stays literal — quotes disable expansion. Just one of the small grammatical traps.
The dotfiles convention
Hidden files start with . by Unix convention. .zshrc, .bashrc, .git, .env — all the configuration sits in your home as dotfiles. ls ignores them by default; ls -A shows them.
The shell expands a tilde first
~ is not an ordinary pathname character understood by every program. The shell expands it before execution, while "~" and strings in configuration files may remain literal. Use an explicit home variable in scripts and application settings.
Dot-dot cannot bypass permissions
A path can contain .., but traversing each real directory still requires execute permission. When a correct-looking path is denied, inspect every directory component rather than only the final file.
For compact notation, identify which layer performs expansion.
Print the fully resolved path as evidence.