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

CommandPurpose
pwdshow the current working directory
ls -lahlist 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

ShortcutPurpose
Tabautocomplete commands and paths
Ctrl + Rsearch 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