man.lsPlain-English help for Unix commands

pwd Print the current working directory

Prints the full path of the folder you are in. Use it when you are lost in a terminal, or when a script needs to record where it is running. The path starts at the root, /, and has no shortcuts.

Synopsis

pwd [-L | -P]

Common options

Option or formWhat it does
-LLogical path. Keeps symbolic link names as you typed them. This is the default
-PPhysical path. Resolves every symbolic link to the real folder
(no option)Behaves like -L
$PWDA shell variable that holds the same logical path, kept up to date by cd
$OLDPWDA shell variable that holds the previous directory, the one cd - returns to
/bin/pwdThe separate program version. It accepts -L and -P like the builtin and defaults to -L as well

Examples

Show where you are
pwd
Show the real path with symlinks resolved
pwd -P
Print the folder after moving into it
cd docs/old && pwd
Use the path in a script
here=$(pwd) && echo "running in $here" > /dev/null
Compare the logical and physical paths
pwd -L && pwd -P
Run the standalone program instead of the builtin
/bin/pwd

Notes

See also

Last reviewed 2026-10-07.