Navigation
Summary
This note is a quick reference for basic shell navigation. These are the commands and shortcuts you use constantly when moving around the filesystem.
Commands
| Command | Purpose |
|---|
pwd | show the current working directory |
ls -lah | list files in long format, including hidden entries, with human-readable sizes |
cd .. | move to the parent directory |
cd ~ | move to the home directory |
cd - | move back to the previous directory |
~ | shorthand for the home directory in paths |
Helpful shortcuts
| Shortcut | Purpose |
|---|
Tab | autocomplete commands and paths |
Ctrl + R | search command history |
Example usage
pwd
ls -lah
cd ..
cd -
cd ~
Notes
cd by itself usually takes you back to your home directory
cd - is one of the most useful navigation habits for quickly switching between two locations