File Operations

pwd

Print the full path of the current working directory.

Synopsis

syntax
pwd [OPTION]

Examples

Print current working directory
pwd
Print physical path resolving all symlinks
pwd -P
Use in a script or command substitution
echo "I am in $(pwd)"

Common options

FlagDescription
-LPrint logical path (with symlinks, default)
-PPrint physical path (resolve symlinks)

About pwd

The `pwd` command print the full path of the current working directory. File operation commands are essential for navigating and managing the Linux filesystem.

They form the backbone of everyday system administration and development workflows. Mastering these commands enables you to efficiently create, move, copy, and organize files and directories from the terminal, which is often faster and more scriptable than graphical alternatives.

The command accepts 2 commonly used flags shown above, though the full set of options is available in the man page (`man pwd`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More File Operations Commands

Other commands in the File Operations category

Related tools