Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

Move up a directory – Terminal


To move up a directory in your terminal, enter the following command:

cd ..


To check if you’ve moved into the correct directory, enter the following command in your terminal to print the full path of the directory you’re currently in:


For example, if you’re currently in the Documents folder on macOS, you should see something like this print out:



Try the following command in your project folder:

cd ..

Then use the following command to move back into the project folder.

cd terminal-exercises


Command Line Primer on the Apple Developer Documentation Archive (see the sections called Specifying Files and Directories and Frequently Used Commands)

Back to: Terminal Course > Terminal Basic Commands