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.

Updated
Viewed
39779 times

Need help? We're always here for you.