How to find a current working directory


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:


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.

40828 times

Need help? We're always here for you.