Linux pwd

The pwd command is used to print or display the name of the working or current directory. Some shells have their own version of the pwd with several features, in here we will discuss the basic features available all over various shells.

Below, we have explained some of the options available in the pwd command.

Option:

-P: this is the default option for pwd if no other option is used, this is used to avoid symlinks, and ‘P’ stands for “Physical.”

-L: this forces the command to use pwd from the environment whether it contains symlinks, ‘L’ stands for “Logical.”

--help: if you want any suggestion from the manual.

--version: to know the version of the pwd command installed on the system. For example, here, we have tried to know our current working directory. We have used the by default option “L” with pwd and get the output shown in the image below.

Linux Pwd