$ CLI Academy

Navigation

Changing Directories (cd)

Move into folders, jump home, and step up one level.

cd means change directory. Give it a path and your shell moves there.

  • cd Documents — enter a subfolder
  • cd .. — go up one level
  • cd ~ or just cd — go to your home directory
  • cd / — go to the filesystem root (Linux/macOS)

After every cd, run pwd to confirm where you landed.

$ Commands to try

$ cd Documents
$ cd ..
$ cd ~
$ cd /tmp

Practice exercise

Navigate to your home folder, then into any subfolder, then back up with cd ... Use pwd after each step.