Linux · Stage 1 – Finding Your Way Around · Lesson 11 of 51

cd: Moving Between Folders

Use cd to change the terminal’s current directory.

From your home directory, enter the Documents folder:

Command

cd Documents
Piece-by-piece explanation
  1. cd is the command.
  2. The space separates the command from its destination.
  3. Documents is the directory name.
  4. Linux names are case-sensitive, so the capital D matters.
Expected output
(no output)

A successful cd normally prints nothing. The prompt may change. Run pwd separately to confirm the new location.

Move one level upward in the tree:

Command

cd ..
Piece-by-piece explanation
  1. cd changes directory.
  2. .. is the special path for the parent directory.
  3. The parent is the folder containing the current folder.
Expected output
(no output)

Success normally has no output. Your prompt returns in the parent directory.

Return directly to your home directory:

Command

cd ~
Piece-by-piece explanation
  1. cd changes location.
  2. ~ is the shortcut for your home directory.
Expected output
(no output)

Success is silent. A prompt containing ~ usually confirms you are home.