Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

pwd command in Linux with Examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

pwd stands for Print Working Directory. It prints the path of the working directory, starting from the root.
pwd is shell built-in command(pwd) or an actual binary(/bin/pwd).
$PWD is an environment variable which stores the path of the current directory.
This command has two flags.

pwd -L: Prints the symbolic path.
pwd -P: Prints the actual path.

A)Built-in pwd (pwd):

In the given example the directory /home/shital/logs/ is a symbolic link for a target directory /var/logs/

B)Binary pwd (/bin/pwd):

The default behavior of Built-in pwd is same as pwd -L.
And the default behavior of /bin/pwd is same as pwd -P.

The $PWD variable value is same as pwd -L.

My Personal Notes arrow_drop_up
Last Updated : 24 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials