O'Reilly logo

Practical Linux by Bill Ball, John Ray, Michael Turner, M. Drew Streib

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Printing the Current Working Directory

Use the pwd (print working directory) command to print the current, or present, working directory (that is, the directory where you are at that moment):

$ pwd
/home/michael

A binary version of the pwd command can be found under the /bin directory, but nearly all shells have a built-in pwd command.

The built-in pwd command is documented in each shell's manual pages; or, from a bash command line, type help pwd.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required