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

Summary

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

cd ..

Details

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:

pwd

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

/Users/Username/Documents

Exercises

Try the following command in your project folder:

cd ..

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

cd terminal-exercises

References

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