Linux pwd command

About pwd

Print the name of the working directory.

Note: This document covers the standalone program, /bin/pwd. Its default behavior is slightly different than the builtin pwd command that is included in your shell. If you are using the bash shell, you can determine which pwd is the default with the type command:

type pwd
pwd is a shell builtin

To specify that you want to run the standalone program instead of the shell builtin, use its complete path in the command, i.e., run it like this:



pwd prints the full pathname of the current working directory.

pwd syntax

pwd [OPTION]...


If the environment variable PWD contains an absolute name of the current directory with no "." or ".." components, then output those contents, even if they contain symbolic links. Otherwise, fall back to default (-P) behavior.
Print a fully resolved name for the current directory, in which all components of the name are actual directory names, and not symbolic links.
--help Display a help message, and exit.
--version Display version information, and exit.

pwd examples


Print the name of the working directory. If any of the subdirectories in the path are symbolic links, and you used the symlink names when changing to the directory, the symlink names are printed. Example output:

pwd -P

Print the name of the working directory, using the actual names of the directory components, even if their symlink names were used when changing to the directory. Example output:


cd — Change the working directory.
readlink — Print the value of a symbolic link or canonical file name.


Thank you for the post! It would be great to get a list - a small gentleman’s Linux command set. I am faced with the fact that many commands / utilities overlap in functionality.