InMotion Hosting Support Center

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

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

Options:
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.

Examples

Using the base command

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

$# pwd
/home/userna5/public_html
  

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
/home/userna5/www
  

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
/home/userna5/public_html
  

Support Center Login

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

Social Media Login

   
Social Login Joomla

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

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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?

Search

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: support@InMotionHosting.com
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!