Linux – pwd Command

The pwd command stands for “print working directory.” It displays the full path to the current directory you are working in. This command is especially useful to confirm your current location within the file system.


Tutorials dojo strip

Initial Example

Using pwd without any options will show the current working directory:

pwd




PWD Parameters

ParameterDescription
-L, --logicalUse the PWD value from the environment, even if it contains symbolic links
-P, --physicalDisplay the actual directory path, bypassing all symbolic links
--helpShow99 the help message and exit
--versionOutput version information and exit




Examples

1. Display the Current Working Directory

Simply typing pwd will display the absolute path of the current working directory.

pwd

2. Display the Current Working Directory with Logical Path

Using the -L option will display the logical path, which follows symbolic links.

pwd -L

3. Display the Current Working Directory with Physical Path

Using the -P option will display the physical path, ignoring symbolic links.

pwd -P




Linux Playground

Scroll to Top