cd (change directory) lets you navigate the file system, moving from one folder to another.

Usage:

bash

cd

Jumps straight to your home directory — the fastest way back to base.

bash

cd /path/to/directory

Moves to a specific directory using its full path.

bash

cd ..

Moves up one level, to the parent directory.

bash

cd ../..

Moves up two levels, to the grandparent directory.

Why it matters:

  • When you open a terminal, you typically land in your home directory by default.
  • cd is one of the most-used commands in daily terminal work — muscle memory pays off here.

Bonus shortcuts:

  • cd - jumps back to the previous directory you were in — handy for bouncing between two locations.
  • cd ~/folder navigates relative to your home directory from anywhere.