saw this hardlinked a couple places, figured we needed a node.

pwd tells you where you are.

pwd, under POSIX systems (read: all UNIX and Linux shells) is a name that happens to be shared by both a program and a shell variable. The pwd program, when run, returns the full absolute pathname of the current directory. The shell variable contains that absolute pathname.

Interestingly enough, the user is allowed to change the pwd shell variable herself. Meaning, if you are in bash, and you want to be weird and not use cd, you can use PWD="/path/to/directory" in its place, and use echo $PWD to tell where you are. Ahh, UNIX. (dwyn notes that cd is always a shell builtin anyway.. so this is not really odd behavior by the shell.)

pwd's rather bizarre name, in case you're wondering, is an acronym for either "Print Working Directory" or "Present Working Directory", depending on who you ask.