Commands · Command

CommandLinuxmacOS

pwd

pwd [options]

Prints the full path of the current working directory.

// FLAGS

-Pprint the physical path, resolving any symlinks

// EXAMPLE

pwd → /home/user/projects/sudo-dojo

// GOTCHA

If you've navigated through a symlink, plain pwd shows the symlinked path, not the real one — use -P when the distinction matters.

// RELATED COMMANDS