pwd command Updated on June 3, 2014 by Scott Mitchell 1 Minutes, 6 Seconds to Read 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 Share this Article Related Articles Understanding Linux Operating Systems How to Install Python 3.9 on CentOS 7 Speed Up grep Searches with LC_ALL=C How To Install RubyGems On Linux unrar and rar Commands 5 Ways to Find a File in Linux Setting Your PHP Settings in Command Line How to Check the Memory Usage on Linux How to Send Files to the Trash Can in Linux with Gio Trash How to Merge PDF Files in the Linux Terminal