Menu
Coddy logo textTech

Change Directory

Part of the Fundamentals section of Coddy's Terminal journey — lesson 6 of 82.

The cd command stands for Change Directory. It lets you navigate from one folder to another in the filesystem.

To move into a folder, type cd followed by the folder name:

cd documents

After running this, you are now inside the documents folder. You can confirm this with pwd:

/home/documents

Useful ways to use cd:

cd .. — move up one level to the parent directory:

cd ..

cd ~ — go directly to your home directory from anywhere:

cd ~

cd / — go to the root directory, the very top of the filesystem:

cd /

cd - — go back to the previous directory you were in:

cd -

Tip: You can combine cd with ls and pwd to explore your filesystem confidently — list what's there, move into it, and confirm where you are.

challenge icon

Challenge

Beginner

Navigate into the documents folder using the cd command, then print your current location using pwd.

Hint: You can run multiple commands one after another — first cd, then pwd.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals