How to find a current working directory

pwd

The pwd command shows you which directory you’re currently in. You can use this command to make sure you’re editing the right file. When you are working on files with identical names situated in different folders, use pwd to ensure you don’t accidentally change the wrong one:

pwd.jpg

You can see that our working directory is /home/nc/public_html/pictures/. The pwd command is very useful when you’re using a lot of relative paths, because it’s very easy to get lost.

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close