PWD command in Linux – syntax, options, use, and example

PWD command in Linux – syntax, choices, use, and example

PWD stands for Print Working Directory. It prints the whole absolute path of the present listing you’re in.

While working with Linux information and directories, you progress round from one listing to a different one. Anytime if you wish to know in which listing you’re in then, the pwd command tells you that.

PWD Command In Linux
PWD Command In Linux

syntax of PWD command in Linux

pwd [ -LP ]

Where L and P are non-compulsory choices.


Options Description
-L Displays the logical path of present working listing. This logical path contains the symbolic hyperlink path of the present working listing.


This is the default choice if no choices specified.

-p Displays the bodily path of present working listing after resolving symbolic hyperlinks. It reveals the total pathname without a symbolic hyperlink of the present working listing.

Note: When no choice is specified with the command PWD, it mechanically considers -L into motion.

PWD example in Linux

Let us try some enjoyable with pwd command and see the place we exist.

To know the present working listing simply hit both pwd or pwd -L in any listing.

pwd command in linux

pwd or pwd -L each are equal.

Let us now try pwd with -P choice. Since it shows the bodily path of present working listing after resolving symbolic hyperlinks. Hence we have to create a symbolic hyperlink to check.

C Programming Recommended Post

Get Salesforce Answers here

Pramod Kumar Yadav is from Janakpur Dham, Nepal. He was born on December 23, 1994, and has one elder brother and two elder sisters. He completed his education at various schools and colleges in Nepal and completed a degree in Computer Science Engineering from MITS in Andhra Pradesh, India. Pramod has worked as the owner of RC Educational Foundation Pvt Ltd, a teacher, and an Educational Consultant, and is currently working as an Engineer and Digital Marketer.

Best PYthon Course

Get More trending Courses

Leave a Comment