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.
Initial Example
Using pwd
without any options will show the current working directory:
pwd
PWD Parameters
Parameter | Description |
---|---|
-L, --logical | Use the PWD value from the environment, even if it contains symbolic links |
-P, --physical | Display the actual directory path, bypassing all symbolic links |
--help | Show99 the help message and exit |
--version | Output 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