Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Print working directory – Terminal

Summary

To print the working directory, enter the following command:

pwd

Details

The above command will print out the full path of the directory you are currently in.

Here’s an example of what the output would be if you used pwd in your user directory (Name would be your username on your computer):

/Users/Name

If you used pwd in your Documents folder, the output would look like this:

/Users/Name/Documents

Exercises

Try the following command in your project folder:

pwd

References

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

Back to: Terminal Reference > Terminal Basic Commands