Skip to content

pwd command

Print the full path of the current directory.

On this page

Syntax

pwd [-L|-P]

Provided by the coreutils package. Run man pwd for the full manual.

Common options

OptionWhat it does
-LLogical path, keeps symlink names (default)
-PPhysical path with symlinks resolved

Examples

  1. Show the current directory

    pwd
  2. Show the real path behind symlinks

    pwd -P
  3. Save the current path in a variable

    DIR=$(pwd)

← All Linux commands · Suggest a fix

Back to top