Navigation

pwd

Prints the current working directory.

pwd tells you the absolute path of the directory your shell is currently using for relative commands.

Syntax
pwd

Arguments explained

  • No required arguments. -P can show the physical path without symlink shortcuts in many shells.

Common examples

Show where you are
pwd

Prints a path such as /home/alex/projects.

Use in a script
current_dir=$(pwd)

Stores the current directory path in a shell variable.

pwd Command
FieldDetails
Commandpwd
CategoryNavigation
Primary usePrints the current working directory.
Syntaxpwd