pwd command
Print the full path of the current directory.
- Files & directories
- Package coreutils
- 2 options · 3 examples
On this page
Syntax
pwd [-L|-P]Provided by the coreutils package. Run man pwd for the full manual.
Common options
| Option | What it does |
|---|---|
-L | Logical path, keeps symlink names (default) |
-P | Physical path with symlinks resolved |
Examples
Show the current directory
pwdShow the real path behind symlinks
pwd -PSave the current path in a variable
DIR=$(pwd)
No example matches. Check the options table or search the guides.
