Back to the command reference

pwd

FilesBeginner In simulator In real Linux

Print the current working directory

Name: pwd = print working directory

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

pwd prints the absolute path of the current directory. bash has a builtin version and there is also a standalone /usr/bin/pwd.

-L (the default) shows the logical path including symbolic links; -P shows the physical path with all links resolved.

Syntax

pwd [OPTION]

Common options

-PPrint the physical path (symbolic links resolved)
-LPrint the logical path, which may contain symbolic links (the default)

Examples

  • $ pwd

    Print the current directory, e.g. /home/user

    Explain

Related