$pwd
Print the absolute path of the current working directory.
pwd [OPTIONS]Try `pwd` Live in Interactive Sandbox
Zero-install client simulation with real-time feedback.
Overview & How pwd Works
`pwd` stands for "Print Working Directory". It outputs the full, absolute path starting from the root directory (`/`) to the folder you are currently located in. It is critical for writing scripts and verifying current context before executing destructive commands like `rm`.
Common Flags & Command Options
| Flag / Option | Description |
|---|---|
| -L | Print logical working directory (resolving symbolic links according to shell). |
| -P | Print physical working directory with all symbolic links completely resolved. |
Practical Real-World Examples
Outputs the absolute filesystem path.
Frequently Asked Questions
What is the difference between logical and physical paths in pwd?
If you enter a symlinked folder, `pwd -L` displays the symlink path you followed, whereas `pwd -P` reveals the true physical underlying directory on disk.
Related Linux Commands
List directory contents including file sizes, permissions, ownership, and modification timestamps.
Change the current working directory in the shell workspace.
Print the effective username associated with the current shell session.
Locate the executable binary path of a command in system PATH.
Display directory structure in a recursive visual tree diagram.