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.

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 Course > Terminal Basic Commands