InMotion Hosting Support Center

The pwd command allows the user to view their current location in the directory structure.

Command: pwd
Synopsis: pwd [OPTION]...

These are the few options available for the pwd command.

Option Long Name Description
-L --logical use PWD from environment, even if it contains symlinks
-P --physical avoid all symlinks

If both -L and -P are entered (pwd -LP or pwd -PL), the last one will be used. If neither option is used, the -L option will be assumed by default.


Using the base command

Using the pwd command will result in displaying the path where the user is located.

$# pwd

Using the logical option

Using the logical option will display the path including symlinks. For the example below we are in a folder named 'www', the www folder is actually a symlink to the public_html folder. The result displays the www folder in the path as if it were an actual folder.

$# pwd -L

Using the physical option

Using the physical option will display the path not including any symlinks. As in the above example, we are in the www folder. However, since it is a symlink to the public_html folder, it displays the actual physical folder it is in instead, which is public_html.

$# pwd -P

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!